ChangeSet 1.1587.3.42, 2004/05/11 11:34:29-07:00, greg@kroah.com USB: make functions static in usb drivers that should be Thanks to Tridge's findstatic.pl script for helping find these. drivers/usb/class/bluetty.c | 4 - drivers/usb/input/aiptek.c | 4 - drivers/usb/input/hid-core.c | 8 +- drivers/usb/input/kbtab.c | 2 drivers/usb/input/wacom.c | 4 - drivers/usb/media/ultracam.c | 2 drivers/usb/media/w9968cf.h | 4 - drivers/usb/misc/cytherm.c | 9 -- drivers/usb/misc/emi26.c | 2 drivers/usb/misc/emi26_fw.h | 6 - drivers/usb/misc/emi62.c | 2 drivers/usb/misc/emi62_fw_m.h | 7 + drivers/usb/misc/emi62_fw_s.h | 7 + drivers/usb/net/kaweth.c | 18 ++-- drivers/usb/net/pegasus.c | 4 - drivers/usb/net/rtl8150.c | 8 +- drivers/usb/net/usbnet.c | 10 +- drivers/usb/serial/io_ti.c | 10 +- drivers/usb/serial/ipaq.c | 2 drivers/usb/serial/ir-usb.c | 2 drivers/usb/serial/kobil_sct.c | 2 drivers/usb/storage/datafab.c | 2 drivers/usb/storage/isd200.c | 26 +++--- drivers/usb/storage/jumpshot.c | 2 drivers/usb/storage/shuttle_usbat.c | 142 +++++++++++++++++------------------- drivers/usb/storage/shuttle_usbat.h | 20 ----- 26 files changed, 145 insertions(+), 164 deletions(-) diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c --- a/drivers/usb/class/bluetty.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/class/bluetty.c Fri May 14 15:29:21 2004 @@ -1234,7 +1234,7 @@ .chars_in_buffer = bluetooth_chars_in_buffer, }; -int usb_bluetooth_init(void) +static int usb_bluetooth_init(void) { int i; int result; @@ -1283,7 +1283,7 @@ } -void usb_bluetooth_exit(void) +static void usb_bluetooth_exit(void) { usb_deregister(&usb_bluetooth_driver); tty_unregister_driver(bluetooth_tty_driver); diff -Nru a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c --- a/drivers/usb/input/aiptek.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/input/aiptek.c Fri May 14 15:29:21 2004 @@ -188,13 +188,13 @@ __FUNCTION__, retval); } -struct aiptek_features aiptek_features[] = { +static struct aiptek_features aiptek_features[] = { {"Aiptek 6000U/8000U", 8, 3000, 2250, 26, 511, aiptek_irq, 0, 0, 0, 0}, {NULL, 0} }; -struct usb_device_id aiptek_ids[] = { +static struct usb_device_id aiptek_ids[] = { {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20), .driver_info = 0}, {} }; diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c --- a/drivers/usb/input/hid-core.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/input/hid-core.c Fri May 14 15:29:21 2004 @@ -958,7 +958,7 @@ * Create a report. */ -void hid_output_report(struct hid_report *report, __u8 *data) +static void hid_output_report(struct hid_report *report, __u8 *data) { unsigned n; @@ -1038,7 +1038,8 @@ return -1; } -int hid_find_field_in_report(struct hid_report *report, __u32 wanted_usage, struct hid_field **field) +#if 0 +static int hid_find_field_in_report(struct hid_report *report, __u32 wanted_usage, struct hid_field **field) { int i, j; @@ -1051,6 +1052,7 @@ return -1; } +#endif static int hid_submit_out(struct hid_device *hid) { @@ -1420,7 +1422,7 @@ #define USB_DEVICE_ID_1_PHIDGETSERVO_20 0x8101 #define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104 -struct hid_blacklist { +static struct hid_blacklist { __u16 idVendor; __u16 idProduct; unsigned quirks; diff -Nru a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c --- a/drivers/usb/input/kbtab.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/input/kbtab.c Fri May 14 15:29:21 2004 @@ -95,7 +95,7 @@ __FUNCTION__, retval); } -struct usb_device_id kbtab_ids[] = { +static struct usb_device_id kbtab_ids[] = { { USB_DEVICE(USB_VENDOR_ID_KBGEAR, 0x1001), .driver_info = 0 }, { } }; diff -Nru a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c --- a/drivers/usb/input/wacom.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/input/wacom.c Fri May 14 15:29:21 2004 @@ -527,7 +527,7 @@ __FUNCTION__, retval); } -struct wacom_features wacom_features[] = { +static struct wacom_features wacom_features[] = { { "Wacom Penpartner", 7, 5040, 3780, 255, 32, 0, wacom_penpartner_irq }, { "Wacom Graphire", 8, 10206, 7422, 511, 32, 1, wacom_graphire_irq }, { "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 32, 1, wacom_graphire_irq }, @@ -556,7 +556,7 @@ { } }; -struct usb_device_id wacom_ids[] = { +static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x00) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x10) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x11) }, diff -Nru a/drivers/usb/media/ultracam.c b/drivers/usb/media/ultracam.c --- a/drivers/usb/media/ultracam.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/media/ultracam.c Fri May 14 15:29:21 2004 @@ -95,7 +95,7 @@ * 02-Nov-2000 First (mostly dummy) version. * 06-Nov-2000 Rewrote to dump all data into frame. */ -void ultracam_ProcessIsocData(struct uvd *uvd, struct usbvideo_frame *frame) +static void ultracam_ProcessIsocData(struct uvd *uvd, struct usbvideo_frame *frame) { int n; diff -Nru a/drivers/usb/media/w9968cf.h b/drivers/usb/media/w9968cf.h --- a/drivers/usb/media/w9968cf.h Fri May 14 15:29:21 2004 +++ b/drivers/usb/media/w9968cf.h Fri May 14 15:29:21 2004 @@ -189,8 +189,8 @@ VPP_UYVY_TO_RGBX = 0x08, }; -struct list_head w9968cf_dev_list; /* head of V4L registered cameras list */ -LIST_HEAD(w9968cf_dev_list); +static struct list_head w9968cf_dev_list; /* head of V4L registered cameras list */ +static LIST_HEAD(w9968cf_dev_list); struct semaphore w9968cf_devlist_sem; /* semaphore for list traversal */ /* Main device driver structure */ diff -Nru a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c --- a/drivers/usb/misc/cytherm.c Fri May 14 15:29:22 2004 +++ b/drivers/usb/misc/cytherm.c Fri May 14 15:29:22 2004 @@ -46,9 +46,6 @@ static int cytherm_probe(struct usb_interface *interface, const struct usb_device_id *id); static void cytherm_disconnect(struct usb_interface *interface); -int vendor_command(struct usb_device *dev, unsigned char request, - unsigned char value, unsigned char index, - void *buf, int size); /* usb specific object needed to register this driver with the usb subsystem */ @@ -71,9 +68,9 @@ /* Send a vendor command to device */ -int vendor_command(struct usb_device *dev, unsigned char request, - unsigned char value, unsigned char index, - void *buf, int size) +static int vendor_command(struct usb_device *dev, unsigned char request, + unsigned char value, unsigned char index, + void *buf, int size) { return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), request, diff -Nru a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c --- a/drivers/usb/misc/emi26.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/misc/emi26.c Fri May 14 15:29:21 2004 @@ -226,7 +226,7 @@ { } -struct usb_driver emi26_driver = { +static struct usb_driver emi26_driver = { .owner = THIS_MODULE, .name = "emi26 - firmware loader", .probe = emi26_probe, diff -Nru a/drivers/usb/misc/emi26_fw.h b/drivers/usb/misc/emi26_fw.h --- a/drivers/usb/misc/emi26_fw.h Fri May 14 15:29:22 2004 +++ b/drivers/usb/misc/emi26_fw.h Fri May 14 15:29:22 2004 @@ -17,7 +17,7 @@ * any driver which includes this firmware, in whole or in part, * requires the inclusion of this statement. */ -INTEL_HEX_RECORD g_bitstream[]={ +static INTEL_HEX_RECORD g_bitstream[]={ { 16, 0x8010, 0, {0xff,0xff,0xff,0xff,0xaa,0x99,0x55,0x66,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x07 } }, { 16, 0x8020, 0, {0x30,0x01,0x60,0x01,0x00,0x00,0x00,0x0b,0x30,0x01,0x20,0x01,0x00,0x80,0x3f,0x2d } }, { 16, 0x8030, 0, {0x30,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x09 } }, @@ -4406,7 +4406,7 @@ * any driver which includes this firmware, in whole or in part, * requires the inclusion of this statement. */ -INTEL_HEX_RECORD g_Firmware[] = { +static INTEL_HEX_RECORD g_Firmware[] = { { 3,0x0000,0,{0x02,0x43,0x56} }, { 3,0x0003,0,{0x02,0x4b,0xcd} }, { 3,0x000b,0,{0x02,0x4b,0xd2} }, @@ -5669,7 +5669,7 @@ * any driver which includes this firmware, in whole or in part, * requires the inclusion of this statement. */ -INTEL_HEX_RECORD g_Loader[] = { +static INTEL_HEX_RECORD g_Loader[] = { { 3,0x0000,0,{0x02,0x03,0x1c} }, { 3,0x0043,0,{0x02,0x04,0x00} }, { 16,0x0100,0,{0x90,0x7f,0xe9,0xe0,0x24,0x5b,0x60,0x60,0x24,0x02,0x60,0x03,0x02,0x01,0xbe,0x90} }, diff -Nru a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c --- a/drivers/usb/misc/emi62.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/misc/emi62.c Fri May 14 15:29:21 2004 @@ -265,7 +265,7 @@ { } -struct usb_driver emi62_driver = { +static struct usb_driver emi62_driver = { .owner = THIS_MODULE, .name = "emi62 - firmware loader", .probe = emi62_probe, diff -Nru a/drivers/usb/misc/emi62_fw_m.h b/drivers/usb/misc/emi62_fw_m.h --- a/drivers/usb/misc/emi62_fw_m.h Fri May 14 15:29:21 2004 +++ b/drivers/usb/misc/emi62_fw_m.h Fri May 14 15:29:21 2004 @@ -3,7 +3,7 @@ */ /* generated Tue Jun 3 21:36:11 EEST 2003 */ -INTEL_HEX_RECORD g_emi62bs[]={ +static INTEL_HEX_RECORD g_emi62bs[]={ 16, 0x8010, 0, {0xff,0xff,0xff,0xff,0xaa,0x99,0x55,0x66,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x07 }, 16, 0x8020, 0, {0x30,0x01,0x60,0x01,0x00,0x00,0x00,0x0d,0x30,0x01,0x20,0x01,0x00,0x80,0x3f,0x2d }, 16, 0x8030, 0, {0x30,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x09 }, @@ -6112,7 +6112,7 @@ }; // VERSION= 1.0.0.191 // DATE= 2002oct28 -INTEL_HEX_RECORD g_HexMidiFw62[] = { +static INTEL_HEX_RECORD g_HexMidiFw62[] = { 3,0x0000,0,{0x02,0x46,0xb9}, 3,0x0003,0,{0x02,0x0f,0xfd}, 3,0x000b,0,{0x02,0x4e,0x0f}, @@ -8640,7 +8640,8 @@ /* VERSION=1.04.062 DATE=16.10.2002 -*/INTEL_HEX_RECORD g_emi62_loader[] = { +*/ +static INTEL_HEX_RECORD g_emi62_loader[] = { 3,0x0000,0,{0x02,0x02,0x87}, 3,0x0043,0,{0x02,0x04,0x00}, 16,0x0100,0,{0xe4,0xff,0xfe,0xc2,0x20,0xd2,0xe8,0x43,0xd8,0x20,0x90,0x7f,0xab,0x74,0xff,0xf0}, diff -Nru a/drivers/usb/misc/emi62_fw_s.h b/drivers/usb/misc/emi62_fw_s.h --- a/drivers/usb/misc/emi62_fw_s.h Fri May 14 15:29:21 2004 +++ b/drivers/usb/misc/emi62_fw_s.h Fri May 14 15:29:21 2004 @@ -3,7 +3,7 @@ */ /* generated Tue Apr 15 21:59:42 EEST 2003 */ -INTEL_HEX_RECORD g_emi62bs[]={ +static INTEL_HEX_RECORD g_emi62bs[]={ {16, 0x8010, 0, {0xff,0xff,0xff,0xff,0xaa,0x99,0x55,0x66,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x07 }}, {16, 0x8020, 0, {0x30,0x01,0x60,0x01,0x00,0x00,0x00,0x0d,0x30,0x01,0x20,0x01,0x00,0x80,0x3f,0x2d }}, {16, 0x8030, 0, {0x30,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x80,0x01,0x00,0x00,0x00,0x09 }}, @@ -6112,7 +6112,7 @@ }; // VERSION= 1.0.0.191 // DATE= 2002oct28 -INTEL_HEX_RECORD g_HexSpdifFw62[] = { +static INTEL_HEX_RECORD g_HexSpdifFw62[] = { {3,0x0000,0,{0x02,0x45,0xf9}}, { 3,0x0003,0,{0x02,0x0f,0xfd}}, { 3,0x000b,0,{0x02,0x4d,0x9b}}, @@ -8623,7 +8623,8 @@ /* VERSION=1.04.062 DATE=16.10.2002 -*/INTEL_HEX_RECORD g_emi62_loader[] = { +*/ +static INTEL_HEX_RECORD g_emi62_loader[] = { { 3,0x0000,0,{0x02,0x02,0x87}}, { 3,0x0043,0,{0x02,0x04,0x00}}, {16,0x0100,0,{0xe4,0xff,0xfe,0xc2,0x20,0xd2,0xe8,0x43,0xd8,0x20,0x90,0x7f,0xab,0x74,0xff,0xf0}}, diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c --- a/drivers/usb/net/kaweth.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/net/kaweth.c Fri May 14 15:29:21 2004 @@ -123,9 +123,10 @@ const struct usb_device_id *id /* from id_table */ ); static void kaweth_disconnect(struct usb_interface *intf); -int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, - struct usb_ctrlrequest *cmd, void *data, - int len, int timeout); +static int kaweth_internal_control_msg(struct usb_device *usb_dev, + unsigned int pipe, + struct usb_ctrlrequest *cmd, void *data, + int len, int timeout); /**************************************************************** * usb_device_id @@ -1277,9 +1278,10 @@ /*-------------------------------------------------------------------*/ // returns status (negative) or length (positive) -int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, - struct usb_ctrlrequest *cmd, void *data, int len, - int timeout) +static int kaweth_internal_control_msg(struct usb_device *usb_dev, + unsigned int pipe, + struct usb_ctrlrequest *cmd, void *data, + int len, int timeout) { struct urb *urb; int retv; @@ -1305,7 +1307,7 @@ /**************************************************************** * kaweth_init ****************************************************************/ -int __init kaweth_init(void) +static int __init kaweth_init(void) { kaweth_dbg("Driver loading"); return usb_register(&kaweth_driver); @@ -1314,7 +1316,7 @@ /**************************************************************** * kaweth_exit ****************************************************************/ -void __exit kaweth_exit(void) +static void __exit kaweth_exit(void) { usb_deregister(&kaweth_driver); } diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c --- a/drivers/usb/net/pegasus.c Fri May 14 15:29:22 2004 +++ b/drivers/usb/net/pegasus.c Fri May 14 15:29:22 2004 @@ -1321,13 +1321,13 @@ .id_table = pegasus_ids, }; -int __init pegasus_init(void) +static int __init pegasus_init(void) { info(DRIVER_VERSION ":" DRIVER_DESC); return usb_register(&pegasus_driver); } -void __exit pegasus_exit(void) +static void __exit pegasus_exit(void) { usb_deregister(&pegasus_driver); } diff -Nru a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c --- a/drivers/usb/net/rtl8150.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/net/rtl8150.c Fri May 14 15:29:21 2004 @@ -167,7 +167,7 @@ typedef struct rtl8150 rtl8150_t; -unsigned long multicast_filter_limit = 32; +static unsigned long multicast_filter_limit = 32; static void fill_skb_pool(rtl8150_t *); static void free_skb_pool(rtl8150_t *); @@ -516,7 +516,7 @@ netif_wake_queue(dev->netdev); } -void intr_callback(struct urb *urb, struct pt_regs *regs) +static void intr_callback(struct urb *urb, struct pt_regs *regs) { rtl8150_t *dev; __u8 *d; @@ -977,13 +977,13 @@ } } -int __init usb_rtl8150_init(void) +static int __init usb_rtl8150_init(void) { info(DRIVER_DESC " " DRIVER_VERSION); return usb_register(&rtl8150_driver); } -void __exit usb_rtl8150_exit(void) +static void __exit usb_rtl8150_exit(void) { usb_deregister(&rtl8150_driver); } diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/net/usbnet.c Fri May 14 15:29:21 2004 @@ -606,7 +606,7 @@ ax8817x_write_cmd(dev, AX_CMD_SET_HW_MII, 0, 0, 0, &buf); } -void ax8817x_get_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) +static void ax8817x_get_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) { struct usbnet *dev = (struct usbnet *)net->priv; u8 opt; @@ -626,7 +626,7 @@ } } -int ax8817x_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) +static int ax8817x_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) { struct usbnet *dev = (struct usbnet *)net->priv; u8 opt = 0; @@ -646,8 +646,8 @@ return 0; } -int ax8817x_get_eeprom(struct net_device *net, - struct ethtool_eeprom *eeprom, u8 *data) +static int ax8817x_get_eeprom(struct net_device *net, + struct ethtool_eeprom *eeprom, u8 *data) { struct usbnet *dev = (struct usbnet *)net->priv; u16 *ebuf = (u16 *)data; @@ -3014,7 +3014,7 @@ // precondition: never called in_interrupt -int +static int usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) { struct usbnet *dev; diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c Fri May 14 15:29:22 2004 +++ b/drivers/usb/serial/io_ti.c Fri May 14 15:29:22 2004 @@ -279,8 +279,8 @@ * @address_type: Can read both XDATA and I2C * @buffer: pointer to input data buffer */ -int TIReadDownloadMemory (struct usb_device *dev, int start_address, int length, - __u8 address_type, __u8 *buffer) +static int TIReadDownloadMemory(struct usb_device *dev, int start_address, + int length, __u8 address_type, __u8 *buffer) { int status = 0; __u8 read_length; @@ -328,7 +328,7 @@ return status; } -int TIReadRam (struct usb_device *dev, int start_address, int length, __u8 *buffer) +static int TIReadRam (struct usb_device *dev, int start_address, int length, __u8 *buffer) { return TIReadDownloadMemory (dev, start_address, @@ -612,7 +612,7 @@ return 0; } -int TIReadRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer) +static int TIReadRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer) { int status; @@ -632,7 +632,7 @@ return status; } -int TIWriteRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer) +static int TIWriteRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer) { if (serial->product_info.TiMode == TI_MODE_BOOT) return TIWriteBootMemory (serial, diff -Nru a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c --- a/drivers/usb/serial/ipaq.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/serial/ipaq.c Fri May 14 15:29:21 2004 @@ -150,7 +150,7 @@ /* All of the device info needed for the Compaq iPAQ */ -struct usb_serial_device_type ipaq_device = { +static struct usb_serial_device_type ipaq_device = { .owner = THIS_MODULE, .name = "PocketPC PDA", .id_table = ipaq_id_table, diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c --- a/drivers/usb/serial/ir-usb.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/serial/ir-usb.c Fri May 14 15:29:21 2004 @@ -138,7 +138,7 @@ }; -struct usb_serial_device_type ir_device = { +static struct usb_serial_device_type ir_device = { .owner = THIS_MODULE, .name = "IR Dongle", .id_table = id_table, diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c --- a/drivers/usb/serial/kobil_sct.c Fri May 14 15:29:22 2004 +++ b/drivers/usb/serial/kobil_sct.c Fri May 14 15:29:22 2004 @@ -110,7 +110,7 @@ }; -struct usb_serial_device_type kobil_device = { +static struct usb_serial_device_type kobil_device = { .owner = THIS_MODULE, .name = "KOBIL USB smart card terminal", .id_table = id_table, diff -Nru a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c --- a/drivers/usb/storage/datafab.c Fri May 14 15:29:22 2004 +++ b/drivers/usb/storage/datafab.c Fri May 14 15:29:22 2004 @@ -489,7 +489,7 @@ return USB_STOR_TRANSPORT_GOOD; } -void datafab_info_destructor(void *extra) +static void datafab_info_destructor(void *extra) { // this routine is a placeholder... // currently, we don't allocate any extra memory so we're okay diff -Nru a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c --- a/drivers/usb/storage/isd200.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/storage/isd200.c Fri May 14 15:29:21 2004 @@ -349,7 +349,7 @@ * RETURNS: * void */ -void isd200_build_sense(struct us_data *us, Scsi_Cmnd *srb) +static void isd200_build_sense(struct us_data *us, Scsi_Cmnd *srb) { struct isd200_info *info = (struct isd200_info *)us->extra; struct sense_data *buf = (struct sense_data *) &srb->sense_buffer[0]; @@ -505,7 +505,7 @@ * RETURNS: * ISD status code */ -int isd200_read_regs( struct us_data *us ) +static int isd200_read_regs( struct us_data *us ) { struct isd200_info *info = (struct isd200_info *)us->extra; int retStatus = ISD200_GOOD; @@ -534,7 +534,7 @@ * This is used by the protocol layers to actually send the message to * the device and receive the response. */ -void isd200_invoke_transport( struct us_data *us, +static void isd200_invoke_transport( struct us_data *us, Scsi_Cmnd *srb, union ata_cdb *ataCdb ) { @@ -677,7 +677,7 @@ * RETURNS: * ISD status code */ -int isd200_write_config( struct us_data *us ) +static int isd200_write_config( struct us_data *us ) { struct isd200_info *info = (struct isd200_info *)us->extra; int retStatus = ISD200_GOOD; @@ -720,7 +720,7 @@ * RETURNS: * ISD status code */ -int isd200_read_config( struct us_data *us ) +static int isd200_read_config( struct us_data *us ) { struct isd200_info *info = (struct isd200_info *)us->extra; int retStatus = ISD200_GOOD; @@ -765,7 +765,7 @@ * RETURNS: * NT status code */ -int isd200_atapi_soft_reset( struct us_data *us ) +static int isd200_atapi_soft_reset( struct us_data *us ) { int retStatus = ISD200_GOOD; int transferStatus; @@ -791,7 +791,7 @@ * RETURNS: * ISD status code */ -int isd200_srst( struct us_data *us ) +static int isd200_srst( struct us_data *us ) { int retStatus = ISD200_GOOD; int transferStatus; @@ -937,7 +937,7 @@ * RETURNS: * ISD status code */ -int isd200_manual_enum(struct us_data *us) +static int isd200_manual_enum(struct us_data *us) { struct isd200_info *info = (struct isd200_info *)us->extra; int retStatus = ISD200_GOOD; @@ -981,7 +981,7 @@ * RETURNS: * ISD status code */ -int isd200_get_inquiry_data( struct us_data *us ) +static int isd200_get_inquiry_data( struct us_data *us ) { struct isd200_info *info = (struct isd200_info *)us->extra; int retStatus = ISD200_GOOD; @@ -1124,8 +1124,8 @@ * TRUE if the command needs to be sent to the transport layer * FALSE otherwise */ -int isd200_scsi_to_ata(Scsi_Cmnd *srb, struct us_data *us, - union ata_cdb * ataCdb) +static int isd200_scsi_to_ata(Scsi_Cmnd *srb, struct us_data *us, + union ata_cdb * ataCdb) { struct isd200_info *info = (struct isd200_info *)us->extra; struct hd_driveid *id = info->id; @@ -1339,7 +1339,7 @@ * * Frees the driver structure. */ -void isd200_free_info_ptrs(void *info_) +static void isd200_free_info_ptrs(void *info_) { struct isd200_info *info = (struct isd200_info *) info_; @@ -1357,7 +1357,7 @@ * RETURNS: * ISD status code */ -int isd200_init_info(struct us_data *us) +static int isd200_init_info(struct us_data *us) { int retStatus = ISD200_GOOD; struct isd200_info *info; diff -Nru a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c --- a/drivers/usb/storage/jumpshot.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/storage/jumpshot.c Fri May 14 15:29:21 2004 @@ -416,7 +416,7 @@ } -void jumpshot_info_destructor(void *extra) +static void jumpshot_info_destructor(void *extra) { // this routine is a placeholder... // currently, we don't allocate any extra blocks so we're okay diff -Nru a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c --- a/drivers/usb/storage/shuttle_usbat.c Fri May 14 15:29:21 2004 +++ b/drivers/usb/storage/shuttle_usbat.c Fri May 14 15:29:21 2004 @@ -55,11 +55,11 @@ int transferred = 0; -int usbat_read(struct us_data *us, - unsigned char access, - unsigned char reg, - unsigned char *content) { - +static int usbat_read(struct us_data *us, + unsigned char access, + unsigned char reg, + unsigned char *content) +{ int result; result = usb_stor_ctrl_transfer(us, @@ -74,11 +74,11 @@ return result; } -int usbat_write(struct us_data *us, - unsigned char access, - unsigned char reg, - unsigned char content) { - +static int usbat_write(struct us_data *us, + unsigned char access, + unsigned char reg, + unsigned char content) +{ int result; result = usb_stor_ctrl_transfer(us, @@ -93,14 +93,14 @@ return result; } -int usbat_set_shuttle_features(struct us_data *us, - unsigned char external_trigger, - unsigned char epp_control, - unsigned char mask_byte, - unsigned char test_pattern, - unsigned char subcountH, - unsigned char subcountL) { - +static int usbat_set_shuttle_features(struct us_data *us, + unsigned char external_trigger, + unsigned char epp_control, + unsigned char mask_byte, + unsigned char test_pattern, + unsigned char subcountH, + unsigned char subcountL) +{ int result; unsigned char *command = us->iobuf; @@ -125,13 +125,13 @@ return result; } -int usbat_read_block(struct us_data *us, - unsigned char access, - unsigned char reg, - unsigned char *content, - unsigned short len, - int use_sg) { - +static int usbat_read_block(struct us_data *us, + unsigned char access, + unsigned char reg, + unsigned char *content, + unsigned short len, + int use_sg) +{ int result; unsigned char *command = us->iobuf; @@ -171,8 +171,8 @@ * an error condition. */ -int usbat_wait_not_busy(struct us_data *us, int minutes) { - +static int usbat_wait_not_busy(struct us_data *us, int minutes) +{ int i; int result; unsigned char *status = us->iobuf; @@ -216,14 +216,13 @@ return USB_STOR_TRANSPORT_FAILED; } -int usbat_write_block(struct us_data *us, - unsigned char access, - unsigned char reg, - unsigned char *content, - unsigned short len, - int use_sg, - int minutes) { - +static int usbat_write_block(struct us_data *us, + unsigned char access, + unsigned char reg, + unsigned char *content, + unsigned short len, + int use_sg, int minutes) +{ int result; unsigned char *command = us->iobuf; @@ -260,21 +259,21 @@ return usbat_wait_not_busy(us, minutes); } -int usbat_rw_block_test(struct us_data *us, - unsigned char access, - unsigned char *registers, - unsigned char *data_out, - unsigned short num_registers, - unsigned char data_reg, - unsigned char status_reg, - unsigned char timeout, - unsigned char qualifier, - int direction, - unsigned char *content, - unsigned short len, - int use_sg, - int minutes) { - +static int usbat_rw_block_test(struct us_data *us, + unsigned char access, + unsigned char *registers, + unsigned char *data_out, + unsigned short num_registers, + unsigned char data_reg, + unsigned char status_reg, + unsigned char timeout, + unsigned char qualifier, + int direction, + unsigned char *content, + unsigned short len, + int use_sg, + int minutes) +{ int result; unsigned int pipe = (direction == SCSI_DATA_READ) ? us->recv_bulk_pipe : us->send_bulk_pipe; @@ -431,12 +430,12 @@ * transfers of data! */ -int usbat_multiple_write(struct us_data *us, - unsigned char access, - unsigned char *registers, - unsigned char *data_out, - unsigned short num_registers) { - +static int usbat_multiple_write(struct us_data *us, + unsigned char access, + unsigned char *registers, + unsigned char *data_out, + unsigned short num_registers) +{ int result; unsigned char *data = us->iobuf; int i; @@ -479,9 +478,8 @@ return usbat_wait_not_busy(us, 0); } -int usbat_read_user_io(struct us_data *us, - unsigned char *data_flags) { - +static int usbat_read_user_io(struct us_data *us, unsigned char *data_flags) +{ int result; result = usb_stor_ctrl_transfer(us, @@ -496,10 +494,10 @@ return result; } -int usbat_write_user_io(struct us_data *us, - unsigned char enable_flags, - unsigned char data_flags) { - +static int usbat_write_user_io(struct us_data *us, + unsigned char enable_flags, + unsigned char data_flags) +{ int result; result = usb_stor_ctrl_transfer(us, @@ -519,11 +517,11 @@ * a little ( <= 65535 byte) ATAPI pipe */ -int usbat_handle_read10(struct us_data *us, - unsigned char *registers, - unsigned char *data, - Scsi_Cmnd *srb) { - +static int usbat_handle_read10(struct us_data *us, + unsigned char *registers, + unsigned char *data, + Scsi_Cmnd *srb) +{ int result = USB_STOR_TRANSPORT_GOOD; unsigned char *buffer; unsigned int len; @@ -630,8 +628,8 @@ return result; } -static int hp_8200e_select_and_test_registers(struct us_data *us) { - +static int hp_8200e_select_and_test_registers(struct us_data *us) +{ int selector; unsigned char *status = us->iobuf; @@ -679,8 +677,8 @@ return USB_STOR_TRANSPORT_GOOD; } -int init_8200e(struct us_data *us) { - +int init_8200e(struct us_data *us) +{ int result; unsigned char *status = us->iobuf; diff -Nru a/drivers/usb/storage/shuttle_usbat.h b/drivers/usb/storage/shuttle_usbat.h --- a/drivers/usb/storage/shuttle_usbat.h Fri May 14 15:29:21 2004 +++ b/drivers/usb/storage/shuttle_usbat.h Fri May 14 15:29:21 2004 @@ -52,27 +52,7 @@ #define USBAT_UIO_OE0 0x10 // I/O 0 set=output/clr=input #define USBAT_UIO_ADPRST 0x01 // Reset SCM chip -/* USBAT-specific commands */ - -extern int usbat_read(struct us_data *us, unsigned char access, - unsigned char reg, unsigned char *content); -extern int usbat_write(struct us_data *us, unsigned char access, - unsigned char reg, unsigned char content); -extern int usbat_read_block(struct us_data *us, unsigned char access, - unsigned char reg, unsigned char *content, unsigned short len, - int use_sg); -extern int usbat_write_block(struct us_data *us, unsigned char access, - unsigned char reg, unsigned char *content, unsigned short len, - int use_sg, int minutes); -extern int usbat_multiple_write(struct us_data *us, unsigned char access, - unsigned char *registers, unsigned char *data_out, - unsigned short num_registers); -extern int usbat_read_user_io(struct us_data *us, unsigned char *data_flags); -extern int usbat_write_user_io(struct us_data *us, - unsigned char enable_flags, unsigned char data_flags); - /* HP 8200e stuff */ - extern int hp8200e_transport(Scsi_Cmnd *srb, struct us_data *us); extern int init_8200e(struct us_data *us);