staging: android: ion_test: unregister the misc device
Add the remove() method for deregister from misc device when it's unloaded. Signed-off-by: Phong Tran <tranmanphong@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a569f22007
commit
954c2d8f98
@ -261,7 +261,19 @@ static int __init ion_test_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ion_test_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ion_test_device *testdev;
|
||||
|
||||
testdev = platform_get_drvdata(pdev);
|
||||
if (!testdev)
|
||||
return -ENODATA;
|
||||
|
||||
return misc_deregister(&testdev->misc);
|
||||
}
|
||||
|
||||
static struct platform_driver ion_test_platform_driver = {
|
||||
.remove = ion_test_remove,
|
||||
.driver = {
|
||||
.name = "ion-test",
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user