summaryrefslogtreecommitdiff
path: root/drivers/staging/line6/driver.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2012-10-15 20:26:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 15:50:08 -0700
commitb430b3dbdb74e86ee7da7a335cbca2c630167528 (patch)
treead6462bd0d2eef5035903fa39e49358ea8c45ee7 /drivers/staging/line6/driver.c
parent8d64c32b9b2dcf6b647987a04587e55be70c3676 (diff)
staging: line6: drop unused line6_devices[] array
There is no reason to limit the number of line6 devices. Drop the static array. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/line6/driver.c')
-rw-r--r--drivers/staging/line6/driver.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index b8358ca71bdd..ac11a3bd1bbe 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -96,8 +96,6 @@ static const char line6_request_version[] = {
0xf0, 0x7e, 0x7f, 0x06, 0x01, 0xf7
};
-struct usb_line6 *line6_devices[LINE6_MAX_DEVICES];
-
/**
Class for asynchronous messages.
*/
@@ -740,7 +738,6 @@ static int line6_probe(struct usb_interface *interface,
struct usb_device *usbdev;
struct usb_line6 *line6;
const struct line6_properties *properties;
- int devnum;
int interface_number, alternate = 0;
int product;
int size = 0;
@@ -774,16 +771,6 @@ static int line6_probe(struct usb_interface *interface,
goto err_put;
}
- /* find free slot in device table: */
- for (devnum = 0; devnum < LINE6_MAX_DEVICES; ++devnum)
- if (line6_devices[devnum] == NULL)
- break;
-
- if (devnum == LINE6_MAX_DEVICES) {
- ret = -ENODEV;
- goto err_put;
- }
-
/* initialize device info: */
properties = &line6_properties_table[devtype];
dev_info(&interface->dev, "Line6 %s found\n", properties->name);
@@ -1112,7 +1099,6 @@ static int line6_probe(struct usb_interface *interface,
dev_info(&interface->dev, "Line6 %s now attached\n",
line6->properties->name);
- line6_devices[devnum] = line6;
switch (product) {
case LINE6_DEVID_PODX3:
@@ -1141,7 +1127,7 @@ static void line6_disconnect(struct usb_interface *interface)
{
struct usb_line6 *line6;
struct usb_device *usbdev;
- int interface_number, i;
+ int interface_number;
if (interface == NULL)
return;
@@ -1214,10 +1200,6 @@ static void line6_disconnect(struct usb_interface *interface)
dev_info(&interface->dev, "Line6 %s now disconnected\n",
line6->properties->name);
-
- for (i = LINE6_MAX_DEVICES; i--;)
- if (line6_devices[i] == line6)
- line6_devices[i] = NULL;
}
line6_destruct(interface);