Hi

Here is a very dummy patch to make at least my scanning work in 2.5.41.

Obviously registering return scn_minor starting from SCN_BASE_MNR (=48):

  retval = usb_register_dev(&usb_scanner_fops, SCN_BASE_MNR, 1, &scn_minor);

But later scn_minor is used to index p_scn_table[], which is only SCN_MAX_MNR  
(=16) of size.

Rest of the function probe_scanner() seems to rely on scn_minor starting from 0, 
so I just subtracted SCN_MAX_MNR from it.

It makes my Epson 1240U  work for me in both USB2.0 (NEC) and  USB1.1 (AMD OCHI).

I dont know if it works with CONFIG_USB_DYNAMIC_MINORS oe even with devfs, as I
am not using those currently.

--- linux-2.5.41/drivers/usb/image/scanner.c    Mon Oct  7 21:23:58 2002
+++ linux-2.5.41-kjh/drivers/usb/image/scanner.c        Wed Oct  9 20:47:15 2002@@ 
+-978,6 +978,7 @@
                up(&scn_mutex);
                return -ENOMEM;
        }
+       scn_minor -= SCN_BASE_MNR;
 
 /* Check to make sure that the last slot isn't already taken */
        if (p_scn_table[scn_minor]) {


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to