gpio-button-hotplug: fix crash on remove

Don't call gpio_keys_remove recursively. Setting the platform
data to NULL triggered an oops on the second iteration, so there was
no infinate loop.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39124 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
Jonas Gorski
2013-12-17 19:05:03 +00:00
parent 58a22446f4
commit 000da82903

View File

@@ -612,7 +612,7 @@ static int gpio_keys_remove(struct platform_device *pdev)
if (bdev->polled)
gpio_keys_polled_close(bdev);
return gpio_keys_remove(pdev);
return 0;
}
static struct platform_driver gpio_keys_driver = {