From: John Crispin Date: Tue, 14 Aug 2012 12:32:11 +0000 (+0000) Subject: fixes gpio_dev un/reload balancing X-Git-Tag: reboot~13102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5f8ffb88733dcc681075e94710e58133b8564b77;p=oweals%2Fopenwrt.git fixes gpio_dev un/reload balancing Signed-off-by: SHI Bin SVN-Revision: 33183 --- 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; }