# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.567   -> 1.568  
#       drivers/usb/class/printer.c     1.21    -> 1.22   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/05/02      [EMAIL PROTECTED]      1.568
# [PATCH] tiny race with devfs in printer
# 
# USB printer bugfix
# 
# looking through printer.c in preparation for shifting devfs
# support to usbcore I noticed that printer advertises a device
# through devfs before it can be opened.
# As devfs, or more precisely devfsd can be used to trigger actions
# this matters and is wrong.
# --------------------------------------------
#
diff -Nru a/drivers/usb/class/printer.c b/drivers/usb/class/printer.c
--- a/drivers/usb/class/printer.c       Thu May  2 16:47:17 2002
+++ b/drivers/usb/class/printer.c       Thu May  2 16:47:17 2002
@@ -871,6 +871,9 @@
        usblp_check_status(usblp, 0);
 #endif
 
+       /* add a table entry so the device works when advertised */
+       usblp_table[usblp->minor] = usblp;
+
        /* If we have devfs, create with perms=660. */
        sprintf(name, "lp%d", usblp->minor);
        usblp->devfs = devfs_register(usb_devfs_handle, name,
@@ -886,7 +889,7 @@
                usblp->current_protocol, usblp->dev->descriptor.idVendor,
                usblp->dev->descriptor.idProduct);
 
-       return usblp_table[usblp->minor] = usblp;
+       return usblp;
 
 abort:
        if (usblp) {

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to