aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/line6/podhd.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-10-17 10:50:59 +0200
committerTakashi Iwai <tiwai@suse.de>2017-10-17 10:52:06 +0200
commit0011a33f097dd97d09a1ebd32c5d8df0be7ac04a (patch)
tree706b30408893852c5d2f8ef3317ab17d407dcdea /sound/usb/line6/podhd.c
parentALSA: 6fire: remove unused variable card (diff)
parentALSA: caiaq: Fix stray URB at probe error path (diff)
downloadlinux-dev-0011a33f097dd97d09a1ebd32c5d8df0be7ac04a.tar.xz
linux-dev-0011a33f097dd97d09a1ebd32c5d8df0be7ac04a.zip
Merge branch 'for-linus' into for-next
Back-merge for applying the timer API conversion patch for line6 driver that conflicts with the recent fix in upstream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/podhd.c')
-rw-r--r--sound/usb/line6/podhd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/usb/line6/podhd.c b/sound/usb/line6/podhd.c
index acb2170fdc12..46fa8c046cb5 100644
--- a/sound/usb/line6/podhd.c
+++ b/sound/usb/line6/podhd.c
@@ -302,7 +302,8 @@ static void podhd_disconnect(struct usb_line6 *line6)
intf = usb_ifnum_to_if(line6->usbdev,
pod->line6.properties->ctrl_if);
- usb_driver_release_interface(&podhd_driver, intf);
+ if (intf)
+ usb_driver_release_interface(&podhd_driver, intf);
}
}
@@ -318,6 +319,9 @@ static int podhd_init(struct usb_line6 *line6,
line6->disconnect = podhd_disconnect;
+ init_timer(&pod->startup_timer);
+ INIT_WORK(&pod->startup_work, podhd_startup_workqueue);
+
if (pod->line6.properties->capabilities & LINE6_CAP_CONTROL) {
/* claim the data interface */
intf = usb_ifnum_to_if(line6->usbdev,
@@ -359,8 +363,6 @@ static int podhd_init(struct usb_line6 *line6,
}
/* init device and delay registering */
- init_timer(&pod->startup_timer);
- INIT_WORK(&pod->startup_work, podhd_startup_workqueue);
podhd_startup(pod);
return 0;
}