usb-storage: make sddr09 a separate module

This patch (as1207) converts usb-storage's sddr09 subdriver into a
separate module.

An unexpected complication arises because of DPCM devices, in which
one LUN uses the sddr09 transport and one uses the standard CB
transport.  Since these devices can be used even when
USB_STORAGE_SDDR09 isn't configured, their entries in unusual_devs.h
require special treatment.  If SDDR09 isn't configured then the
entries remain in unusual_devs.h; if it is then the entries are
present in unusual_sddr09.h instead.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Alan Stern
2009-02-12 14:47:49 -05:00
committed by Greg Kroah-Hartman
parent e6e244b6cb
commit 0ff71883b2
8 changed files with 174 additions and 108 deletions

View File

@@ -69,9 +69,6 @@
#ifdef CONFIG_USB_STORAGE_USBAT
#include "shuttle_usbat.h"
#endif
#ifdef CONFIG_USB_STORAGE_SDDR09
#include "sddr09.h"
#endif
#ifdef CONFIG_USB_STORAGE_SDDR55
#include "sddr55.h"
#endif
@@ -631,15 +628,6 @@ static void get_transport(struct us_data *us)
break;
#endif
#ifdef CONFIG_USB_STORAGE_SDDR09
case US_PR_EUSB_SDDR09:
us->transport_name = "EUSB/SDDR09";
us->transport = sddr09_transport;
us->transport_reset = usb_stor_CB_reset;
us->max_lun = 0;
break;
#endif
#ifdef CONFIG_USB_STORAGE_SDDR55
case US_PR_SDDR55:
us->transport_name = "SDDR55";
@@ -649,15 +637,6 @@ static void get_transport(struct us_data *us)
break;
#endif
#ifdef CONFIG_USB_STORAGE_DPCM
case US_PR_DPCM_USB:
us->transport_name = "Control/Bulk-EUSB/SDDR09";
us->transport = dpcm_transport;
us->transport_reset = usb_stor_CB_reset;
us->max_lun = 1;
break;
#endif
#ifdef CONFIG_USB_STORAGE_FREECOM
case US_PR_FREECOM:
us->transport_name = "Freecom";