![]() | |||||||||||||
Messages in this thread |
"Thayumanavar Sachithanantham" <thayumk@gmail.com> wrote:
>
> During module unloading, cdev_del be called to unmap cdev related
> kobject references and other cleanups(such as inode->i_cdev being set
> to NULL) which prevents the OOPS upon subsequent loading ,usage and
> unloading of modules(as
> seen in the mail thread
> http://marc.theaimsgroup.com/?l=linux-kernel&m=114533640609018&w=2).
> Patch against 2.6.17-rc1
>
> Signed-off-by: Thayumanavar Sachithanantham <thayumk@gmail.com>
>
> --- linux-2.6/drivers/char/cs5535_gpio.c.orig 2006-04-17
> 21:37:25.000000000 -0700
> +++ linux-2.6/drivers/char/cs5535_gpio.c 2006-04-17
> 21:38:24.000000000 -0700
> @@ -241,6 +241,7 @@ static int __init cs5535_gpio_init(void)
> static void __exit cs5535_gpio_cleanup(void)
> {
> dev_t dev_id = MKDEV(major, 0);
> + cdev_del(&cs5535_gpio_cdev);
> unregister_chrdev_region(dev_id, CS5535_GPIO_COUNT);
Fair enough. Please note that your patch was wordwrapped and had its tabs
replaced with spaces.
> if (gpio_base != 0)
> release_region(gpio_base, CS5535_GPIO_SIZE);
From my reading, this test of gpio_base is unneeded and wrong, btw.
Probably it can't be zero anyway...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
| ||||||||||||
| Last update: 2006-04-19 07:19 [W:0.364 / U:0.720 seconds] ©2003-2008 Jasper Spaans | |||||||||||||