Re: class_device_create() and class_interfaces ?

From: Roland Dreier
Date: Tue Apr 18 2006 - 20:29:39 EST


Greg> I'm working toward getting rid of class_devices entirely.
Greg> What you can do is use a struct device heirachy, right? If
Greg> so, take a look at this patch:
Greg> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/device-class.patch
Greg> which implements the start of this changeover. So, if you
Greg> were to do this, you can just create a separate "bus" and
Greg> drivers for these different devices, and everything should
Greg> bind just fine.

Hmm, that seems a lot more complicated that what I need. And it seems
I end up needing to handle some sort of registration myself anyway,
because someone has to create the virtual devices when a real device
shows up (since multiple drivers can't bind to the same device).

I think I'll just code my own simple registration for sub-drivers of
the combo device -- it will just take a list_head, a mutex and a few
of lines of code. That seems simpler to me than creating a fake bus
and fake devices for each combo device.

Thanks,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/