ChangeSet 1.1455.1.27, 2003/07/15 14:55:31-07:00, henning@meier-geinitz.de [PATCH] USB: fix open/probe race in scanner driver This patch from Oliver Neukum fixes a race between open and probe. drivers/usb/image/scanner.c | 8 +++++--- drivers/usb/image/scanner.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c --- a/drivers/usb/image/scanner.c Thu Jul 17 17:04:21 2003 +++ b/drivers/usb/image/scanner.c Thu Jul 17 17:04:21 2003 @@ -364,6 +364,9 @@ * Mustek, Pacific Image Electronics, Plustek, and Visioneer scanners. * Fixed names of some other scanners. * + * 0.4.14 2003-07-15 + * - Fixed race between open and probe (Oliver Neukum). + * * TODO * - Performance * - Select/poll methods @@ -1117,10 +1120,9 @@ info ("USB scanner device (0x%04x/0x%04x) now attached to %s", dev->descriptor.idVendor, dev->descriptor.idProduct, name); - up(&scn_mutex); - usb_set_intfdata(intf, scn); - + up(&scn_mutex); + return 0; } diff -Nru a/drivers/usb/image/scanner.h b/drivers/usb/image/scanner.h --- a/drivers/usb/image/scanner.h Thu Jul 17 17:04:21 2003 +++ b/drivers/usb/image/scanner.h Thu Jul 17 17:04:21 2003 @@ -43,7 +43,7 @@ // #define DEBUG -#define DRIVER_VERSION "0.4.13" +#define DRIVER_VERSION "0.4.14" #define DRIVER_DESC "USB Scanner Driver" #include