From: Andrew Morton <akpm@osdl.org>
To: "Thayumanavar Sachithanantham" <thayumk@gmail.com>
Cc: info-linux@geode.amd.com, linux-kernel@vger.kernel.org,
rdunlap@xenotime.net
Subject: Re: [PATCH]drivers/char/cs5535_gpio.c:call cdev_del during module_exit to unmap kobject references and other cleanups.
Date: Wed, 19 Apr 2006 00:15:47 -0700 [thread overview]
Message-ID: <20060419001547.320684bf.akpm@osdl.org> (raw)
In-Reply-To: <3b8510d80604182352v11fea186lde1b9987447a3318@mail.gmail.com>
"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...
next prev parent reply other threads:[~2006-04-19 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-19 6:52 [PATCH]drivers/char/cs5535_gpio.c:call cdev_del during module_exit to unmap kobject references and other cleanups Thayumanavar Sachithanantham
2006-04-19 7:15 ` Andrew Morton [this message]
2006-04-19 7:51 ` Thayumanavar Sachithanantham
2006-04-19 9:35 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060419001547.320684bf.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=info-linux@geode.amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=thayumk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.