[ltp] Re: Problem found

Thomas Hood linux-thinkpad@linux-thinkpad.org
17 Oct 2002 23:18:54 +0200


On Thu, 2002-10-17 at 17:20, Silvio B=F6hler wrote:
> I have found the problem! :-)

Yes, I think so.

I assumed that when a device file was registered by a
driver in devfs with given major and minor numbers,
that any nodes made (mknod) with those major and minor
numbers would provide access to the driver.  This
appears not to be the case.  It appears that the major
and minor numbers provided to devfs_register() are=20
just for show -- i.e., they appear in the ls -l listing
and that's all.

I think I know how to solve this.  Cut out the devfs-related
code and just use misc_register(), which itself makes the
necessary devfs calls.  Since devfs 199.13, misc device
drivers can specify the /dev subdirectory into which the
device file will be put (instead of under the "misc"
subdirectory), so we can keep the current devfs naming
scheme (i.e., /dev/thinkpad/thinkpad, /dev/thinkpad/smapi,
etc.).

Sometime I'll send you some new driver code to try.

--
Thomas


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com