From f66fd990c5db177d6b9f0eae301ca6b15882eb2e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 25 Jan 2015 18:22:58 +0100 Subject: 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 Signed-off-by: Takashi Iwai --- sound/usb/line6/variax.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sound/usb/line6/variax.c') 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) /* 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); } -- cgit v1.2.3