diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-25 18:22:58 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-28 07:21:59 +0100 |
commit | f66fd990c5db177d6b9f0eae301ca6b15882eb2e (patch) | |
tree | e583afc51d0962a9f803adfe40e77ff6adefc690 /sound/usb/line6/variax.c | |
parent | 62a109d9e2ce948ee75222bbb92a97669f683875 (diff) | |
download | op-kernel-dev-f66fd990c5db177d6b9f0eae301ca6b15882eb2e.zip op-kernel-dev-f66fd990c5db177d6b9f0eae301ca6b15882eb2e.tar.gz |
ALSA: line6: Drop interface argument from private_init and disconnect callbacks
The interface argument is used just for retrieving the assigned
device, which can be already found in line6->ifcdev. Drop them from
the callbacks. Also, pass the usb id to private_init so that the
driver can deal with it there. This is a preliminary work for the
further cleanup to move the whole allocation into driver.c.
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/variax.c')
-rw-r--r-- | sound/usb/line6/variax.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/usb/line6/variax.c b/sound/usb/line6/variax.c index cd3adef..ba6e85e 100644 --- a/sound/usb/line6/variax.c +++ b/sound/usb/line6/variax.c @@ -210,11 +210,9 @@ static void line6_variax_process_message(struct usb_line6 *line6) /* Variax destructor. */ -static void line6_variax_disconnect(struct usb_interface *interface) +static void line6_variax_disconnect(struct usb_line6 *line6) { - struct usb_line6_variax *variax; - - variax = usb_get_intfdata(interface); + struct usb_line6_variax *variax = (struct usb_line6_variax *)line6; del_timer(&variax->startup_timer1); del_timer(&variax->startup_timer2); @@ -226,8 +224,8 @@ static void line6_variax_disconnect(struct usb_interface *interface) /* Try to init workbench device. */ -static int variax_init(struct usb_interface *interface, - struct usb_line6 *line6) +static int variax_init(struct usb_line6 *line6, + const struct usb_device_id *id) { struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; int err; @@ -303,7 +301,7 @@ static int variax_probe(struct usb_interface *interface, variax = kzalloc(sizeof(*variax), GFP_KERNEL); if (!variax) return -ENODEV; - return line6_probe(interface, &variax->line6, + return line6_probe(interface, id, &variax->line6, &variax_properties_table[id->driver_info], variax_init); } |