lkml.org 
[lkml]   [2005]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Freeing a dynamic struct cdev
On Sat, 06 Aug 2005 15:26:18 -0400 James C. Georgas wrote:

> 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?

Sorry about that, typo on my part. It's cdev_del().

---
~Randy
-
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: 2005-08-06 21:34    [W:0.038 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site