|
|
@@ -54,9 +54,6 @@ struct usb_line6_toneport {
|
|
|
/* Firmware version (x 100) */
|
|
|
u8 firmware_version;
|
|
|
|
|
|
- /* Work for delayed PCM startup */
|
|
|
- struct delayed_work pcm_work;
|
|
|
-
|
|
|
/* Device type */
|
|
|
enum line6_device_type type;
|
|
|
|
|
|
@@ -241,12 +238,8 @@ static int snd_toneport_source_put(struct snd_kcontrol *kcontrol,
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
-static void toneport_start_pcm(struct work_struct *work)
|
|
|
+static void toneport_startup(struct usb_line6 *line6)
|
|
|
{
|
|
|
- struct usb_line6_toneport *toneport =
|
|
|
- container_of(work, struct usb_line6_toneport, pcm_work.work);
|
|
|
- struct usb_line6 *line6 = &toneport->line6;
|
|
|
-
|
|
|
line6_pcm_acquire(line6->line6pcm, LINE6_STREAM_MONITOR, true);
|
|
|
}
|
|
|
|
|
|
@@ -394,7 +387,7 @@ static int toneport_setup(struct usb_line6_toneport *toneport)
|
|
|
if (toneport_has_led(toneport))
|
|
|
toneport_update_led(toneport);
|
|
|
|
|
|
- schedule_delayed_work(&toneport->pcm_work,
|
|
|
+ schedule_delayed_work(&toneport->line6.startup_work,
|
|
|
msecs_to_jiffies(TONEPORT_PCM_DELAY * 1000));
|
|
|
return 0;
|
|
|
}
|
|
|
@@ -407,8 +400,6 @@ static void line6_toneport_disconnect(struct usb_line6 *line6)
|
|
|
struct usb_line6_toneport *toneport =
|
|
|
(struct usb_line6_toneport *)line6;
|
|
|
|
|
|
- cancel_delayed_work_sync(&toneport->pcm_work);
|
|
|
-
|
|
|
if (toneport_has_led(toneport))
|
|
|
toneport_remove_leds(toneport);
|
|
|
}
|
|
|
@@ -424,9 +415,9 @@ static int toneport_init(struct usb_line6 *line6,
|
|
|
struct usb_line6_toneport *toneport = (struct usb_line6_toneport *) line6;
|
|
|
|
|
|
toneport->type = id->driver_info;
|
|
|
- INIT_DELAYED_WORK(&toneport->pcm_work, toneport_start_pcm);
|
|
|
|
|
|
line6->disconnect = line6_toneport_disconnect;
|
|
|
+ line6->startup = toneport_startup;
|
|
|
|
|
|
/* initialize PCM subsystem: */
|
|
|
err = line6_init_pcm(line6, &toneport_pcm_properties);
|