summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dsbr100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dsbr100.c')
-rw-r--r--drivers/usb/dsbr100.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/usb/dsbr100.c b/drivers/usb/dsbr100.c
index aa6372b91..a59759bb9 100644
--- a/drivers/usb/dsbr100.c
+++ b/drivers/usb/dsbr100.c
@@ -70,7 +70,8 @@
#define TB_LEN 16
-static void *usb_dsbr100_probe(struct usb_device *dev, unsigned int ifnum);
+static void *usb_dsbr100_probe(struct usb_device *dev, unsigned int ifnum,
+ const struct usb_device_id *id);
static void usb_dsbr100_disconnect(struct usb_device *dev, void *ptr);
static int usb_dsbr100_ioctl(struct video_device *dev, unsigned int cmd,
void *arg);
@@ -90,28 +91,30 @@ typedef struct
static struct video_device usb_dsbr100_radio=
{
- "D-Link DSB R-100 USB radio",
- VID_TYPE_TUNER,
- VID_HARDWARE_AZTECH,
- usb_dsbr100_open,
- usb_dsbr100_close,
- NULL, /* Can't read (no capture ability) */
- NULL, /* Can't write */
- NULL, /* No poll */
- usb_dsbr100_ioctl,
- NULL,
- NULL
+ name: "D-Link DSB R-100 USB radio",
+ type: VID_TYPE_TUNER,
+ hardware: VID_HARDWARE_AZTECH,
+ open: usb_dsbr100_open,
+ close: usb_dsbr100_close,
+ ioctl: usb_dsbr100_ioctl,
};
static int users = 0;
+static struct usb_device_id usb_dsbr100_table [] = {
+ { idVendor: DSB100_VENDOR, idProduct: DSB100_PRODUCT },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, usb_dsbr100_table);
+
static struct usb_driver usb_dsbr100_driver = {
name: "dsbr100",
probe: usb_dsbr100_probe,
disconnect: usb_dsbr100_disconnect,
- driver_list: {NULL,NULL},
- fops: NULL,
- minor: 0
+ fops: NULL,
+ minor: 0,
+ id_table: usb_dsbr100_table,
};
@@ -164,13 +167,11 @@ static void dsbr100_getstat(usb_dsbr100 *radio)
}
-static void *usb_dsbr100_probe(struct usb_device *dev, unsigned int ifnum)
+static void *usb_dsbr100_probe(struct usb_device *dev, unsigned int ifnum,
+ const struct usb_device_id *id)
{
usb_dsbr100 *radio;
- if (dev->descriptor.idVendor!=DSB100_VENDOR ||
- dev->descriptor.idProduct!=DSB100_PRODUCT)
- return NULL;
if (!(radio = kmalloc(sizeof(usb_dsbr100),GFP_KERNEL)))
return NULL;
usb_dsbr100_radio.priv = radio;