Skip to content

Commit b98a811

Browse files
crorvicktiwai
authored andcommitted
staging: line6: Filter on UX2 interfaces
The driver only supports interface 0 of the TonePort UX2 and POD Studio UX2 devices. Use the device table to filter on this. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 3a3eae6 commit b98a811

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

drivers/staging/line6/driver.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ static const struct usb_device_id line6_id_table[] = {
4646
{ LINE6_IF_NUM(0x414D, 1), .driver_info = LINE6_PODHD500_1 },
4747
{ LINE6_DEVICE(0x4153), .driver_info = LINE6_PODSTUDIO_GX },
4848
{ LINE6_DEVICE(0x4150), .driver_info = LINE6_PODSTUDIO_UX1 },
49-
{ LINE6_DEVICE(0x4151), .driver_info = LINE6_PODSTUDIO_UX2 },
49+
{ LINE6_IF_NUM(0x4151, 0), .driver_info = LINE6_PODSTUDIO_UX2 },
5050
{ LINE6_DEVICE(0x5044), .driver_info = LINE6_PODXT },
5151
{ LINE6_IF_NUM(0x4650, 0), .driver_info = LINE6_PODXTLIVE_POD },
5252
{ LINE6_IF_NUM(0x4650, 1), .driver_info = LINE6_PODXTLIVE_VARIAX },
5353
{ LINE6_DEVICE(0x5050), .driver_info = LINE6_PODXTPRO },
5454
{ LINE6_DEVICE(0x4147), .driver_info = LINE6_TONEPORT_GX },
5555
{ LINE6_DEVICE(0x4141), .driver_info = LINE6_TONEPORT_UX1 },
56-
{ LINE6_DEVICE(0x4142), .driver_info = LINE6_TONEPORT_UX2 },
56+
{ LINE6_IF_NUM(0x4142, 0), .driver_info = LINE6_TONEPORT_UX2 },
5757
{ LINE6_DEVICE(0x534d), .driver_info = LINE6_VARIAX },
5858
{}
5959
};
@@ -768,20 +768,8 @@ static int line6_probe(struct usb_interface *interface,
768768

769769
case LINE6_TONEPORT_UX2:
770770
case LINE6_PODSTUDIO_UX2:
771-
switch (interface_number) {
772-
case 0:
773-
/* defaults to 44.1kHz, 16-bit */
774-
alternate = 2;
775-
break;
776-
case 1:
777-
/* don't know yet what this is ...
778-
alternate = 1;
779-
break;
780-
*/
781-
return -ENODEV;
782-
default:
783-
MISSING_CASE;
784-
}
771+
/* defaults to 44.1kHz, 16-bit */
772+
alternate = 2;
785773
break;
786774

787775
default:

0 commit comments

Comments
 (0)