From: "James C. Georgas" <jgeorgas@rogers.com>
To: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Freeing a dynamic struct cdev
Date: Sat, 06 Aug 2005 15:26:18 -0400 [thread overview]
Message-ID: <1123356380.13845.2.camel@Tachyon.home> (raw)
In-Reply-To: <20050806122108.4a458c68.rdunlap@xenotime.net>
On Sat, 2005-08-06 at 12:21 -0700, Randy.Dunlap wrote:
> On Sat, 06 Aug 2005 09:26:15 -0400 James C. Georgas wrote:
>
> > If I allocate a struct cdev using cdev_alloc(), what function do I call
> > to free it when I'm done with it?
>
> Should be cdev_put(), which calls kobject_put(), which implements
> ref counting (using krefs), so that when the last reference is
> going away, the object will be removed.
>
> ---
> ~Randy
cdev_put() is not an exported symbol in the fs/char_dev.c file. Should
it be?
--
James C. Georgas <jgeorgas@rogers.com>
next prev parent reply other threads:[~2005-08-06 19:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-06 13:26 James C. Georgas
2005-08-06 19:21 ` Randy.Dunlap
2005-08-06 19:26 ` James C. Georgas [this message]
2005-08-06 19:28 ` Randy.Dunlap
[not found] ` <1123362724.13845.11.camel@Tachyon.home>
[not found] ` <20050806155958.5f3092bc.rdunlap@xenotime.net>
2005-08-07 2:47 ` James C. Georgas
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=1123356380.13845.2.camel@Tachyon.home \
--to=jgeorgas@rogers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®