Commit 4638a2b9 authored by Henning Meier-Geinitz's avatar Henning Meier-Geinitz Committed by Greg Kroah-Hartman

[PATCH] USB: fix open/probe race in scanner driver

This patch from Oliver Neukum fixes a race between open and
probe.
parent 1dd7d25a
...@@ -364,6 +364,9 @@ ...@@ -364,6 +364,9 @@
* Mustek, Pacific Image Electronics, Plustek, and Visioneer scanners. * Mustek, Pacific Image Electronics, Plustek, and Visioneer scanners.
* Fixed names of some other scanners. * Fixed names of some other scanners.
* *
* 0.4.14 2003-07-15
* - Fixed race between open and probe (Oliver Neukum).
*
* TODO * TODO
* - Performance * - Performance
* - Select/poll methods * - Select/poll methods
...@@ -1117,10 +1120,9 @@ probe_scanner(struct usb_interface *intf, ...@@ -1117,10 +1120,9 @@ probe_scanner(struct usb_interface *intf,
info ("USB scanner device (0x%04x/0x%04x) now attached to %s", info ("USB scanner device (0x%04x/0x%04x) now attached to %s",
dev->descriptor.idVendor, dev->descriptor.idProduct, name); dev->descriptor.idVendor, dev->descriptor.idProduct, name);
up(&scn_mutex);
usb_set_intfdata(intf, scn); usb_set_intfdata(intf, scn);
up(&scn_mutex);
return 0; return 0;
} }
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
// #define DEBUG // #define DEBUG
#define DRIVER_VERSION "0.4.13" #define DRIVER_VERSION "0.4.14"
#define DRIVER_DESC "USB Scanner Driver" #define DRIVER_DESC "USB Scanner Driver"
#include <linux/usb.h> #include <linux/usb.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment