diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-25 12:22:58 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-28 01:21:59 -0500 |
commit | f66fd990c5db177d6b9f0eae301ca6b15882eb2e (patch) | |
tree | e583afc51d0962a9f803adfe40e77ff6adefc690 /sound/usb/line6/variax.c | |
parent | 62a109d9e2ce948ee75222bbb92a97669f683875 (diff) |
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 cd3adeffde02..ba6e85eed2ba 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) | |||
210 | /* | 210 | /* |
211 | Variax destructor. | 211 | Variax destructor. |
212 | */ | 212 | */ |
213 | static void line6_variax_disconnect(struct usb_interface *interface) | 213 | static void line6_variax_disconnect(struct usb_line6 *line6) |
214 | { | 214 | { |
215 | struct usb_line6_variax *variax; | 215 | struct usb_line6_variax *variax = (struct usb_line6_variax *)line6; |
216 | |||
217 | variax = usb_get_intfdata(interface); | ||
218 | 216 | ||
219 | del_timer(&variax->startup_timer1); | 217 | del_timer(&variax->startup_timer1); |
220 | del_timer(&variax->startup_timer2); | 218 | del_timer(&variax->startup_timer2); |
@@ -226,8 +224,8 @@ static void line6_variax_disconnect(struct usb_interface *interface) | |||
226 | /* | 224 | /* |
227 | Try to init workbench device. | 225 | Try to init workbench device. |
228 | */ | 226 | */ |
229 | static int variax_init(struct usb_interface *interface, | 227 | static int variax_init(struct usb_line6 *line6, |
230 | struct usb_line6 *line6) | 228 | const struct usb_device_id *id) |
231 | { | 229 | { |
232 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; | 230 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; |
233 | int err; | 231 | int err; |
@@ -303,7 +301,7 @@ static int variax_probe(struct usb_interface *interface, | |||
303 | variax = kzalloc(sizeof(*variax), GFP_KERNEL); | 301 | variax = kzalloc(sizeof(*variax), GFP_KERNEL); |
304 | if (!variax) | 302 | if (!variax) |
305 | return -ENODEV; | 303 | return -ENODEV; |
306 | return line6_probe(interface, &variax->line6, | 304 | return line6_probe(interface, id, &variax->line6, |
307 | &variax_properties_table[id->driver_info], | 305 | &variax_properties_table[id->driver_info], |
308 | variax_init); | 306 | variax_init); |
309 | } | 307 | } |