mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]>
This commit is contained in:
commit
0011a33f09
7 changed files with 40 additions and 14 deletions
|
|
@ -476,10 +476,12 @@ static int init_card(struct snd_usb_caiaqdev *cdev)
|
|||
|
||||
err = snd_usb_caiaq_send_command(cdev, EP1_CMD_GET_DEVICE_INFO, NULL, 0);
|
||||
if (err)
|
||||
return err;
|
||||
goto err_kill_urb;
|
||||
|
||||
if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ))
|
||||
return -ENODEV;
|
||||
if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ)) {
|
||||
err = -ENODEV;
|
||||
goto err_kill_urb;
|
||||
}
|
||||
|
||||
usb_string(usb_dev, usb_dev->descriptor.iManufacturer,
|
||||
cdev->vendor_name, CAIAQ_USB_STR_LEN);
|
||||
|
|
@ -514,6 +516,10 @@ static int init_card(struct snd_usb_caiaqdev *cdev)
|
|||
|
||||
setup_card(cdev);
|
||||
return 0;
|
||||
|
||||
err_kill_urb:
|
||||
usb_kill_urb(&cdev->ep1_in_urb);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int snd_probe(struct usb_interface *intf,
|
||||
|
|
|
|||
|
|
@ -793,9 +793,10 @@ int line6_probe(struct usb_interface *interface,
|
|||
return 0;
|
||||
|
||||
error:
|
||||
if (line6->disconnect)
|
||||
line6->disconnect(line6);
|
||||
snd_card_free(card);
|
||||
/* we can call disconnect callback here because no close-sync is
|
||||
* needed yet at this point
|
||||
*/
|
||||
line6_disconnect(interface);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(line6_probe);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2234,6 +2234,9 @@ static int parse_audio_unit(struct mixer_build *state, int unitid)
|
|||
|
||||
static void snd_usb_mixer_free(struct usb_mixer_interface *mixer)
|
||||
{
|
||||
/* kill pending URBs */
|
||||
snd_usb_mixer_disconnect(mixer);
|
||||
|
||||
kfree(mixer->id_elems);
|
||||
if (mixer->urb) {
|
||||
kfree(mixer->urb->transfer_buffer);
|
||||
|
|
@ -2584,8 +2587,13 @@ _error:
|
|||
|
||||
void snd_usb_mixer_disconnect(struct usb_mixer_interface *mixer)
|
||||
{
|
||||
usb_kill_urb(mixer->urb);
|
||||
usb_kill_urb(mixer->rc_urb);
|
||||
if (mixer->disconnected)
|
||||
return;
|
||||
if (mixer->urb)
|
||||
usb_kill_urb(mixer->urb);
|
||||
if (mixer->rc_urb)
|
||||
usb_kill_urb(mixer->rc_urb);
|
||||
mixer->disconnected = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ struct usb_mixer_interface {
|
|||
struct urb *rc_urb;
|
||||
struct usb_ctrlrequest *rc_setup_packet;
|
||||
u8 rc_buffer[6];
|
||||
|
||||
bool disconnected;
|
||||
};
|
||||
|
||||
#define MAX_CHANNELS 16 /* max logical channels */
|
||||
|
|
|
|||
Loading…
Reference in a new issue