char driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-06-18 at 15:30 -0700, hong zhang wrote:
> The book of linux device driver says register_chrdev will go away and do not use it.

Then use register_chrdev_region() as that book suggests.  This way, you
specify how many devices you need rather than just take 256 of them.

> Do you mean misc_register only can handle one device? For example,
> there are several wifi devices, misc_register can only deal one of
> them not all?

Correct.  misc_register() is for unique character devices, such
as /dev/null.  If you intend to have one character device per one
hardware device, and the hardware device is not guaranteed to be unique
for the system (e.g. be present at most in one instance), then
misc_register() is not what you need.

-- 
Regards,
Pavel Roskin


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux