lkml.org 
[lkml]   [2003]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] RFC: Attributes in /sys/cdev
From
Date
> > I have no idea whether this follows the original plan for /sys/cdev.
>
> They are more of a side effect.

So...to be sure I have things straight.../sys/cdev isn't really meant to be
there, and char devices wanting to do things in sysfs should be working
under /sys/devices or /sys/class or /sys/somethingelse?

> * driver has embedded struct cdev in its data structures

> * ->open() can use ->i_cdev to get whatever data structure driver
> had intended and avoid any lookups of its own

I noticed there's no "private" member in the cdev structure. So drivers
should embed the structure and use container_of to get their real structure
of interest?

[Forgive my ignorance here...] If I embed a struct cdev within my own
device structure, how do I know when I can safely free said device
structure? Will there be a release method that gets exposed at the driver
level, or am I missing something obvious again?

Thanks,

jon

Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net
-
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-03-22 13:48    [W:0.068 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site