[PATCH] storage: Replace magic number with define in usb_stor_euscsi_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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@xxxxxxxxxxx>

---
diff -up linux-3.17-rc5/drivers/usb/storage/initializers.c.orig linux-3.17-rc5/drivers/usb/storage/initializers.c
--- linux-3.17-rc5/drivers/usb/storage/initializers.c.orig	2014-09-15 01:50:12.000000000 +0100
+++ linux-3.17-rc5/drivers/usb/storage/initializers.c	2014-09-21 19:47:32.000000000 +0100
@@ -52,7 +52,7 @@ int usb_stor_euscsi_init(struct us_data
 	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;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux