Re: dev file

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

 



On Fri, Dec 09, 2005 at 12:42:22PM +0800, Hsieh Steve wrote:
> HI ,
> we are implement a chrdev in linux
> to register the device, we first use old-style dev file
> system register_chrdev() to do register
> then , in order to let the dev file created automatically, we add
> devfs_register() after calling register_chrdev()
> ,with the same MAJOR_NUM and dev_file_name
> currently, it works well
> 
> But is it proper to use both new style and old style dev file together?
> can I just use devfs_register()?

devfs_register is now gone in the 2.6 kernel (well, it's still there,
but doesn't do anything as devfs is disabled.)  So just use the chrdev()
interface (which you need to do even if you want to call the devfs call
anyway.)

See the Linux Device Drivers book, third edition, free online, for more
details about this.

good luck,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux