storage: Replace magic number with define in usb_stor_euscsi_init()
authorMark Knibbs <markk@clara.co.uk>
Sun, 21 Sep 2014 18:59:42 +0000 (19:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 05:29:27 +0000 (22:29 -0700)
usb_stor_euscsi_init() calls usb_stor_control_msg() with timeout
argument 5000. USB_CTRL_SET_TIMEOUT is defined to be 5000 in usb.h, so
would it make sense to use that instead? Patch below if it would.

Signed-off-by: Mark Knibbs <markk@clara.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/initializers.c

index 5a8b5ff1e45bf597d9028c80e585047b0148e838..4bc2fc98636ed27f65ec8425c6a3e583e580174e 100644 (file)
@@ -52,7 +52,7 @@ int usb_stor_euscsi_init(struct us_data *us)
        us->iobuf[0] = 0x1;
        result = usb_stor_control_msg(us, us->send_ctrl_pipe,
                        0x0C, USB_RECIP_INTERFACE | USB_TYPE_VENDOR,
-                       0x01, 0x0, us->iobuf, 0x1, 5000);
+                       0x01, 0x0, us->iobuf, 0x1, USB_CTRL_SET_TIMEOUT);
        usb_stor_dbg(us, "-- result is %d\n", result);
 
        return 0;