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
1 changed files with 12 additions and 0 deletions
|
@ -261,7 +261,19 @@ static int __init ion_test_probe(struct platform_device *pdev)
|
||||||
return 0;
|
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 = {
|
static struct platform_driver ion_test_platform_driver = {
|
||||||
|
.remove = ion_test_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "ion-test",
|
.name = "ion-test",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue