Commit 954c2d8f authored by Phong Tran's avatar Phong Tran Committed by Greg Kroah-Hartman

staging: android: ion_test: unregister the misc device

Add the remove() method for deregister from misc device
when it's unloaded.
Signed-off-by: default avatarPhong Tran <tranmanphong@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a569f220
......@@ -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",
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment