Commit bf4850bf authored by Matthew Dharm's avatar Matthew Dharm Committed by Linus Torvalds

[PATCH] USB: usb-storage: re-organize probe/disconnect

This patch re-organizes probe and disconnect into smaller functions (which
are all functionally equivalent to the current code).  This allows easier
verification that the code is correct, and will make for easier
implementation of the proper SCSI shutdown code.
parent b900e936
This diff is collapsed.
...@@ -107,6 +107,7 @@ struct us_data { ...@@ -107,6 +107,7 @@ struct us_data {
*/ */
struct semaphore dev_semaphore; /* protect pusb_dev */ struct semaphore dev_semaphore; /* protect pusb_dev */
struct usb_device *pusb_dev; /* this usb_device */ struct usb_device *pusb_dev; /* this usb_device */
struct usb_interface *pusb_intf; /* this interface */
unsigned long flags; /* from filter initially */ unsigned long flags; /* from filter initially */
unsigned int send_bulk_pipe; /* cached pipe values */ unsigned int send_bulk_pipe; /* cached pipe values */
unsigned int recv_bulk_pipe; unsigned int recv_bulk_pipe;
...@@ -114,7 +115,7 @@ struct us_data { ...@@ -114,7 +115,7 @@ struct us_data {
unsigned int recv_ctrl_pipe; unsigned int recv_ctrl_pipe;
unsigned int recv_intr_pipe; unsigned int recv_intr_pipe;
/* information about the device -- always good */ /* information about the device */
char vendor[USB_STOR_STRING_LEN]; char vendor[USB_STOR_STRING_LEN];
char product[USB_STOR_STRING_LEN]; char product[USB_STOR_STRING_LEN];
char serial[USB_STOR_STRING_LEN]; char serial[USB_STOR_STRING_LEN];
...@@ -124,11 +125,7 @@ struct us_data { ...@@ -124,11 +125,7 @@ struct us_data {
u8 protocol; u8 protocol;
u8 max_lun; u8 max_lun;
/* information about the device -- only good if device is attached */
u8 ifnum; /* interface number */ u8 ifnum; /* interface number */
u8 ep_in; /* bulk in endpoint */
u8 ep_out; /* bulk out endpoint */
u8 ep_int; /* interrupt endpoint */
u8 ep_bInterval; /* interrupt interval */ u8 ep_bInterval; /* interrupt interval */
/* function pointers for this device */ /* function pointers for this device */
......
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