ALSA: line6/toneport: Fix wrong argument for toneport_has_led()
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Jan 2015 07:55:06 +0000 (08:55 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Jan 2015 06:20:02 +0000 (07:20 +0100)
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/toneport.c

index fb6d5e1e2adea7ac6c6829ebc72d8e602ed63ed7..9a4f5403569e3aa95fa7b16aaf10f8a35429134c 100644 (file)
@@ -370,13 +370,11 @@ static void toneport_setup(struct usb_line6_toneport *toneport)
 static void line6_toneport_disconnect(struct usb_interface *interface)
 {
        struct usb_line6_toneport *toneport;
-       u16 idProduct;
 
        toneport = usb_get_intfdata(interface);
        del_timer_sync(&toneport->timer);
-       idProduct = le16_to_cpu(toneport->line6.usbdev->descriptor.idProduct);
 
-       if (toneport_has_led(idProduct)) {
+       if (toneport_has_led(toneport->type)) {
                device_remove_file(&interface->dev, &dev_attr_led_red);
                device_remove_file(&interface->dev, &dev_attr_led_green);
        }