On Tue, Jun 05, 2001 at 08:57:25AM -0400, Kevin Lawton wrote:
> I see in host-linux.c, that the devfs mods I integrated awhile
> ago, call devfs_register/unregister in _addition_ to
> register_chrdev/unregister_chrdev.
>
> Is this correct? Do we need to call both pairs? I would
> think devfs would replace the old chrdev conventions.
>From a brief look through the Linux 2.4.4 source, I found this
in linux/drivers/char/ip2main.c:
#ifdef CONFIG_DEVFS_FS
if (( err = devfs_register_chrdev ( IP2_IPL_MAJOR, pcIpl, &ip2_ipl )))
#else
if ( ( err = register_chrdev ( IP2_IPL_MAJOR, pcIpl, &ip2_ipl ) ) )
#endif
which seems to agree with my suspicions that one or the other
should be sufficient.
But devfs_register_chrdev basically just calls register_chrdev
anyway, so I'm not sure why it's necessary in the above code
snippet, unless it is expected to change in future or
something...
linux/drivers/ide/ide-tape.c just uses
devfs_{un,}register{_chrdev} unconditionally.
Of course, I have never written a device driver, let alone one
making use of devfs on Linux 2.4.x, so I could be missing
something. :)
--
Michael Wood | Tel: +27 21 762 0276 | http://www.kingsley.co.za/
[EMAIL PROTECTED] | Fax: +27 21 761 9930 | Kingsley Technologies