Re: device model and character devices

Greg KH
2006-04-05T18:32:39Z

On Wed, Apr 05, 2006 at 11:52:57AM +0400, Artem B. Bityutskiy wrote:
> Greg KH wrote:
> >Because "struct device" generally is not related to a major:minor pair
> >at all. That is what a struct class_device is for. Lots of struct
> >device users have nothing to do with a char device, and some have
> >multiple char devices associated with a single struct device.
> Well, OK, but AFAIK, your long-term plan is to merge class_device and
> device, so in the long-term perspective it does not matter. And those
> who do not need a character device support may have a possibility to
> disable it.

Yes, that's my goal in the long term, and I have a patch availble that
starts to do that:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/device-class.patch

but we have a lot of work to get there.

And even then, a struct device will be separate from a char device. For
one example, the cdev structure is used by the kernel to look up the
device properly, which has nothing to do with struct device (or struct
class_device) at all at this time.

thanks,

greg k-h