porting driver 2.4 -> 2.6, confused by device model
Sebastian Kuzminsky
seb at highlab.com
Sat Feb 24 01:24:12 CST 2007
Greg KH <greg at kroah.com> wrote:
> On Fri, Feb 23, 2007 at 11:03:04PM -0700, Sebastian Kuzminsky wrote:
> > One thing I'm not sure how to do, I'd like to group the device files
> > in directories. Something like /dev/dmm/cardX/adcY. How do I create
> > the directories?
>
> Create a udev rule that adds them in a subdirectory. See the rule that
> creates the /dev/bus/usb/BUS_NUM/DEVICE_NUM directories for an example
> of one way to do this.
Yeah, I see how that's done, good example. Man, that's some funky syntax!
That'd take care of the /dev nodes, but it'd be nice if the /sys/class/dmm
tree was organized the same way. (dmm is my module and class, named
for the Diamond-MM card that it drives.)
I was hoping I could just give the full paths to device_create(),
but that fails. Can the "parent" argument to device_create() be used
for this? Currently I'm passing in NULL for all the parents.
It's not that big a deal, I'm more curious. You've un-stuck me and I
thank you.
--
Sebastian Kuzminsky The Stage is too big for the Drama.
-- Richard P. Feynman
More information about the Kernel-mentors
mailing list