Commit b430b3db authored by Stefan Hajnoczi's avatar Stefan Hajnoczi Committed by Greg Kroah-Hartman

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: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8d64c32b
...@@ -96,8 +96,6 @@ static const char line6_request_version[] = { ...@@ -96,8 +96,6 @@ static const char line6_request_version[] = {
0xf0, 0x7e, 0x7f, 0x06, 0x01, 0xf7 0xf0, 0x7e, 0x7f, 0x06, 0x01, 0xf7
}; };
struct usb_line6 *line6_devices[LINE6_MAX_DEVICES];
/** /**
Class for asynchronous messages. Class for asynchronous messages.
*/ */
...@@ -740,7 +738,6 @@ static int line6_probe(struct usb_interface *interface, ...@@ -740,7 +738,6 @@ static int line6_probe(struct usb_interface *interface,
struct usb_device *usbdev; struct usb_device *usbdev;
struct usb_line6 *line6; struct usb_line6 *line6;
const struct line6_properties *properties; const struct line6_properties *properties;
int devnum;
int interface_number, alternate = 0; int interface_number, alternate = 0;
int product; int product;
int size = 0; int size = 0;
...@@ -774,16 +771,6 @@ static int line6_probe(struct usb_interface *interface, ...@@ -774,16 +771,6 @@ static int line6_probe(struct usb_interface *interface,
goto err_put; 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: */ /* initialize device info: */
properties = &line6_properties_table[devtype]; properties = &line6_properties_table[devtype];
dev_info(&interface->dev, "Line6 %s found\n", properties->name); dev_info(&interface->dev, "Line6 %s found\n", properties->name);
...@@ -1112,7 +1099,6 @@ static int line6_probe(struct usb_interface *interface, ...@@ -1112,7 +1099,6 @@ static int line6_probe(struct usb_interface *interface,
dev_info(&interface->dev, "Line6 %s now attached\n", dev_info(&interface->dev, "Line6 %s now attached\n",
line6->properties->name); line6->properties->name);
line6_devices[devnum] = line6;
switch (product) { switch (product) {
case LINE6_DEVID_PODX3: case LINE6_DEVID_PODX3:
...@@ -1141,7 +1127,7 @@ static void line6_disconnect(struct usb_interface *interface) ...@@ -1141,7 +1127,7 @@ static void line6_disconnect(struct usb_interface *interface)
{ {
struct usb_line6 *line6; struct usb_line6 *line6;
struct usb_device *usbdev; struct usb_device *usbdev;
int interface_number, i; int interface_number;
if (interface == NULL) if (interface == NULL)
return; return;
...@@ -1214,10 +1200,6 @@ static void line6_disconnect(struct usb_interface *interface) ...@@ -1214,10 +1200,6 @@ static void line6_disconnect(struct usb_interface *interface)
dev_info(&interface->dev, "Line6 %s now disconnected\n", dev_info(&interface->dev, "Line6 %s now disconnected\n",
line6->properties->name); line6->properties->name);
for (i = LINE6_MAX_DEVICES; i--;)
if (line6_devices[i] == line6)
line6_devices[i] = NULL;
} }
line6_destruct(interface); line6_destruct(interface);
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#endif #endif
#define LINE6_TIMEOUT 1 #define LINE6_TIMEOUT 1
#define LINE6_MAX_DEVICES 8
#define LINE6_BUFSIZE_LISTEN 32 #define LINE6_BUFSIZE_LISTEN 32
#define LINE6_MESSAGE_MAXLEN 256 #define LINE6_MESSAGE_MAXLEN 256
...@@ -78,7 +77,6 @@ do { \ ...@@ -78,7 +77,6 @@ do { \
} while (0) } while (0)
extern const unsigned char line6_midi_id[3]; extern const unsigned char line6_midi_id[3];
extern struct usb_line6 *line6_devices[LINE6_MAX_DEVICES];
static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3; static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3;
static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4; static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4;
......
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