[lkml]   [2001]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectdevfs support for the USB scanner driver
Hello, this is my first message here and I am a little bit intimidated: 
I'm not new to software hacking but the Linux kernel is a different
matter. Please be nice. :-)

I switched to devfs yesterday and I had to patch the USB scanner driver
because it didn't support devfs. *Then* I looked around and I discovered
that this patch has already been done twice: one comes from Pavel Roskin
and another is in the 2.4.8-ac6 kernel. Note however that the latter is
incorrect because it supports only one scanner: devfs_register() is given
the name "scanner" instead of "scanner%d" (with %d = minor).

This patch is trivial and definitely useful so I would argue that it
should go into the official kernel soon.

Two questions/requests for comments:
1. Where should one call devfs_unregister()? Pavel's patch calls it in
close_scanner() and disconnect_scanner(), but I believe you only need to
do it in disconnect_scanner() where the scn_usb_data structure is kfree'd.

2. Which default permissions should apply to the device files? The printer
driver used 660 and that's OK because only the printer daemon will usually
talk to the device, but I think 666 is preferable for the scanner because
in general it will be used by users (no pun intended). The patch in
2.4.8-ac6 uses 660, the other patch uses 664.

Flavio Stanchina
Trento - Italy

"The best defense against logic is ignorance."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:58    [W:0.029 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site