Commit fc245714 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: fixed problems when CONFIG_HOTPLUG=n and usb drivers were built into the kernel.

  
removed __devinitdata and __devinit on structures and functions that should
not have them.
Thanks to Tom Rini for pointing this out.
parent e261944f
......@@ -233,7 +233,7 @@ static int i2c_detect_tries = 5;
#define ov51x_mmx_available (0)
#endif
static __devinitdata struct usb_device_id device_table [] = {
static struct usb_device_id device_table [] = {
{ USB_DEVICE(VEND_OMNIVISION, PROD_OV511) },
{ USB_DEVICE(VEND_OMNIVISION, PROD_OV511PLUS) },
{ USB_DEVICE(VEND_OMNIVISION, PROD_OV518) },
......
......@@ -66,7 +66,7 @@
/* Function prototypes and driver templates */
/* hotplug device table support */
static __devinitdata struct usb_device_id pwc_device_table [] = {
static struct usb_device_id pwc_device_table [] = {
{ USB_DEVICE(0x0471, 0x0302) },
{ USB_DEVICE(0x0471, 0x0303) },
{ USB_DEVICE(0x0471, 0x0304) },
......
......@@ -29,7 +29,6 @@ static const char version[] = "0.23";
#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/vmalloc.h>
......@@ -42,18 +41,12 @@ static const char version[] = "0.23";
#include <linux/wrapper.h>
#include <linux/mm.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
#define virt_to_page(arg) MAP_NR(arg)
#define vmalloc_32 vmalloc
#endif
#include "se401.h"
static int flickerless=0;
static int video_nr = -1;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
static __devinitdata struct usb_device_id device_table [] = {
static struct usb_device_id device_table [] = {
{ USB_DEVICE(0x03e8, 0x0004) },/* Endpoints/Aox SE401 */
{ USB_DEVICE(0x0471, 0x030b) },/* Philips PCVC665K */
{ USB_DEVICE(0x047d, 0x5001) },/* Kensington 67014 */
......@@ -63,7 +56,6 @@ static __devinitdata struct usb_device_id device_table [] = {
};
MODULE_DEVICE_TABLE(usb, device_table);
#endif
MODULE_AUTHOR("Jeroen Vreeken <pe1rxq@amsat.org>");
MODULE_DESCRIPTION("SE401 USB Camera Driver");
......@@ -1402,12 +1394,8 @@ static int se401_init(struct usb_se401 *se401)
return 0;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
static void* se401_probe(struct usb_device *dev, unsigned int ifnum)
#else
static void* __devinit se401_probe(struct usb_device *dev, unsigned int ifnum,
static void* se401_probe(struct usb_device *dev, unsigned int ifnum,
const struct usb_device_id *id)
#endif
{
struct usb_interface_descriptor *interface;
struct usb_se401 *se401;
......@@ -1535,9 +1523,7 @@ static inline void usb_se401_remove_disconnected (struct usb_se401 *se401)
static struct usb_driver se401_driver = {
name: "se401",
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
id_table: device_table,
#endif
probe: se401_probe,
disconnect: se401_disconnect
};
......
......@@ -1449,7 +1449,7 @@ static struct video_device stv680_template = {
fops: &stv680_fops,
};
static void *__devinit stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
static void *stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
{
struct usb_interface_descriptor *interface;
struct usb_stv *stv680;
......
......@@ -45,7 +45,7 @@
/* fmt 4 */
#define STV_VIDEO_PALETTE VIDEO_PALETTE_RGB24
static __devinitdata struct usb_device_id device_table[] = {
static struct usb_device_id device_table[] = {
{USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
{}
};
......
......@@ -787,7 +787,7 @@ static int vicam_init(struct usb_vicam *vicam)
return 1;
}
static void * __devinit vicam_probe(struct usb_device *udev, unsigned int ifnum,
static void *vicam_probe(struct usb_device *udev, unsigned int ifnum,
const struct usb_device_id *id)
{
struct usb_vicam *vicam;
......
......@@ -103,7 +103,7 @@ static int belkin_sa_ioctl (struct usb_serial_port *port, struct file * file,
static void belkin_sa_break_ctl (struct usb_serial_port *port, int break_state );
static __devinitdata struct usb_device_id id_table_combined [] = {
static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
{ USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
{ USB_DEVICE(PERACOM_VID, PERACOM_PID) },
......
......@@ -66,7 +66,7 @@ static void cyberjack_read_int_callback( struct urb *urb );
static void cyberjack_read_bulk_callback (struct urb *urb);
static void cyberjack_write_bulk_callback (struct urb *urb);
static __devinitdata struct usb_device_id id_table [] = {
static struct usb_device_id id_table [] = {
{ USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) },
{ } /* Terminating entry */
};
......
......@@ -483,12 +483,12 @@ static __devinitdata struct usb_device_id id_table_combined [] = {
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_2 [] = {
static struct usb_device_id id_table_2 [] = {
{ USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_4 [] = {
static struct usb_device_id id_table_4 [] = {
{ USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
{ } /* Terminating entry */
};
......
......@@ -103,7 +103,7 @@ static void empeg_set_termios (struct usb_serial_port *port, struct termios *ol
static void empeg_write_bulk_callback (struct urb *urb);
static void empeg_read_bulk_callback (struct urb *urb);
static __devinitdata struct usb_device_id id_table [] = {
static struct usb_device_id id_table [] = {
{ USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) },
{ } /* Terminating entry */
};
......
......@@ -120,7 +120,7 @@
#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>"
#define DRIVER_DESC "USB FTDI RS232 Converters Driver"
static __devinitdata struct usb_device_id id_table_sio [] = {
static struct usb_device_id id_table_sio [] = {
{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
{ } /* Terminating entry */
};
......@@ -133,7 +133,7 @@ static __devinitdata struct usb_device_id id_table_sio [] = {
*/
static __devinitdata struct usb_device_id id_table_8U232AM [] = {
static struct usb_device_id id_table_8U232AM [] = {
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
{ USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
{ } /* Terminating entry */
......
......@@ -14,12 +14,12 @@
#ifndef IO_TABLES_H
#define IO_TABLES_H
static __devinitdata struct usb_device_id edgeport_1port_id_table [] = {
static struct usb_device_id edgeport_1port_id_table [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
{ }
};
static __devinitdata struct usb_device_id edgeport_2port_id_table [] = {
static struct usb_device_id edgeport_2port_id_table [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
......@@ -33,7 +33,7 @@ static __devinitdata struct usb_device_id edgeport_2port_id_table [] = {
{ }
};
static __devinitdata struct usb_device_id edgeport_4port_id_table [] = {
static struct usb_device_id edgeport_4port_id_table [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
......@@ -50,7 +50,7 @@ static __devinitdata struct usb_device_id edgeport_4port_id_table [] = {
{ }
};
static __devinitdata struct usb_device_id edgeport_8port_id_table [] = {
static struct usb_device_id edgeport_8port_id_table [] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
......
......@@ -78,7 +78,7 @@ static int ipaq_chars_in_buffer(struct usb_serial_port *port);
static void ipaq_destroy_lists(struct usb_serial_port *port);
static __devinitdata struct usb_device_id ipaq_id_table [] = {
static struct usb_device_id ipaq_id_table [] = {
{ USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_548_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_568_ID) },
......
......@@ -119,7 +119,7 @@ static u8 ir_baud = 0;
static u8 ir_xbof = 0;
static u8 ir_add_bof = 0;
static __devinitdata struct usb_device_id id_table [] = {
static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x050f, 0x0180) }, /* KC Technology, KC-180 */
{ USB_DEVICE(0x08e9, 0x0100) }, /* XTNDAccess */
{ USB_DEVICE(0x09c4, 0x0011) }, /* ACTiSys ACT-IR2000U */
......
......@@ -435,7 +435,7 @@ static __devinitdata struct usb_device_id keyspan_ids_combined[] = {
MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
/* usb_device_id table for the pre-firmware download keyspan devices */
static __devinitdata struct usb_device_id keyspan_pre_ids[] = {
static struct usb_device_id keyspan_pre_ids[] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },
......@@ -449,7 +449,7 @@ static __devinitdata struct usb_device_id keyspan_pre_ids[] = {
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_1port_ids[] = {
static struct usb_device_id keyspan_1port_ids[] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },
......@@ -458,14 +458,14 @@ static __devinitdata struct usb_device_id keyspan_1port_ids[] = {
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_2port_ids[] = {
static struct usb_device_id keyspan_2port_ids[] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id keyspan_4port_ids[] = {
static struct usb_device_id keyspan_4port_ids[] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },
{ } /* Terminating entry */
};
......
......@@ -154,20 +154,20 @@ static __devinitdata struct usb_device_id id_table_combined [] = {
MODULE_DEVICE_TABLE (usb, id_table_combined);
static __devinitdata struct usb_device_id id_table_std [] = {
static struct usb_device_id id_table_std [] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
{ } /* Terminating entry */
};
#ifdef KEYSPAN
static __devinitdata struct usb_device_id id_table_fake [] = {
static struct usb_device_id id_table_fake [] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
{ } /* Terminating entry */
};
#endif
#ifdef XIRCOM
static __devinitdata struct usb_device_id id_table_fake_xircom [] = {
static struct usb_device_id id_table_fake_xircom [] = {
{ USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
{ USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
{ }
......
......@@ -109,7 +109,7 @@ static void klsi_105_break_ctl (struct usb_serial_port *port,
/*
* All of the device info needed for the KLSI converters.
*/
static __devinitdata struct usb_device_id id_table [] = {
static struct usb_device_id id_table [] = {
{ USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) },
{ USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) },
{ } /* Terminating entry */
......
......@@ -129,7 +129,7 @@ static void mct_u232_break_ctl (struct usb_serial_port *port,
/*
* All of the device info needed for the MCT USB-RS232 converter.
*/
static __devinitdata struct usb_device_id id_table_combined [] = {
static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
{ USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
{ USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
......
......@@ -76,7 +76,7 @@ static int omninet_write (struct usb_serial_port *port, int from_user, const u
static int omninet_write_room (struct usb_serial_port *port);
static void omninet_shutdown (struct usb_serial *serial);
static __devinitdata struct usb_device_id id_table [] = {
static struct usb_device_id id_table [] = {
{ USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) },
{ } /* Terminating entry */
};
......
......@@ -65,7 +65,7 @@
static __devinitdata struct usb_device_id id_table [] = {
static struct usb_device_id id_table [] = {
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
......
......@@ -140,7 +140,7 @@ MODULE_PARM_DESC (padded, "Pad to full wMaxPacketSize On/Off");
bInterfaceClass: (ic), \
bInterfaceSubClass: (isc),
static __devinitdata struct usb_device_id id_table[] = {
static struct usb_device_id id_table[] = {
{MY_USB_DEVICE (0x49f, 0xffff, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Itsy
{MY_USB_DEVICE (0x3f0, 0x2101, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Calypso
{MY_USB_DEVICE (0x4dd, 0x8001, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, // Iris
......
......@@ -177,7 +177,7 @@ static void visor_read_bulk_callback (struct urb *urb);
static int clie_3_5_startup (struct usb_serial *serial);
static __devinitdata struct usb_device_id combined_id_table [] = {
static struct usb_device_id id_table [] = {
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
......@@ -191,12 +191,12 @@ static __devinitdata struct usb_device_id combined_id_table [] = {
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id clie_id_3_5_table [] = {
static struct usb_device_id clie_id_3_5_table [] = {
{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table [] = {
static __devinitdata struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
......@@ -211,7 +211,7 @@ static __devinitdata struct usb_device_id id_table [] = {
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, id_table);
MODULE_DEVICE_TABLE (usb, id_table_combined);
......@@ -219,7 +219,7 @@ MODULE_DEVICE_TABLE (usb, id_table);
static struct usb_serial_device_type handspring_device = {
owner: THIS_MODULE,
name: "Handspring Visor / Palm 4.0 / Clié 4.x",
id_table: combined_id_table,
id_table: id_table,
num_interrupt_in: 0,
num_bulk_in: 2,
num_bulk_out: 2,
......
......@@ -100,12 +100,12 @@
separate ID tables, and then a third table that combines them
just for the purpose of exporting the autoloading information.
*/
static __devinitdata struct usb_device_id id_table_std [] = {
static struct usb_device_id id_table_std [] = {
{ USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
{ } /* Terminating entry */
};
static __devinitdata struct usb_device_id id_table_prerenumeration [] = {
static struct usb_device_id id_table_prerenumeration [] = {
{ USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
{ } /* Terminating entry */
};
......
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