From e66a7efb238d815996eace74c0a41fcd9561007d Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 14 Aug 2012 12:32:11 +0000 Subject: [kernel] fixes gpio_dev un/reload balancing Signed-off-by: SHI Bin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33183 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/generic/files/drivers/char/gpio_dev.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'target/linux/generic') diff --git a/target/linux/generic/files/drivers/char/gpio_dev.c b/target/linux/generic/files/drivers/char/gpio_dev.c index 0f428bd38b..c741573026 100644 --- a/target/linux/generic/files/drivers/char/gpio_dev.c +++ b/target/linux/generic/files/drivers/char/gpio_dev.c @@ -141,6 +141,8 @@ out: static int gpio_remove(struct platform_device *dev) { + device_destroy(gpiodev_class, MKDEV(dev_major, 0)); + class_destroy(gpiodev_class); unregister_chrdev(dev_major, DEVNAME); return 0; } -- cgit v1.2.3