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/driver.c | |
parent | ALSA: line6: Skip volume manipulation during silence copying (diff) | |
download | linux-f66fd990c5db177d6b9f0eae301ca6b15882eb2e.tar.xz linux-f66fd990c5db177d6b9f0eae301ca6b15882eb2e.zip |
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/driver.c')
-rw-r--r-- | sound/usb/line6/driver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c index 4d2d233d0505..e2fbff05c1b1 100644 --- a/sound/usb/line6/driver.c +++ b/sound/usb/line6/driver.c @@ -488,9 +488,10 @@ static int line6_init_cap_control(struct usb_line6 *line6) Probe USB device. */ int line6_probe(struct usb_interface *interface, + const struct usb_device_id *id, struct usb_line6 *line6, const struct line6_properties *properties, - int (*private_init)(struct usb_interface *, struct usb_line6 *)) + int (*private_init)(struct usb_line6 *, const struct usb_device_id *id)) { struct usb_device *usbdev = interface_to_usbdev(interface); struct snd_card *card; @@ -552,7 +553,7 @@ int line6_probe(struct usb_interface *interface, } /* initialize device data based on device: */ - ret = private_init(interface, line6); + ret = private_init(line6, id); if (ret < 0) goto error; @@ -565,7 +566,7 @@ int line6_probe(struct usb_interface *interface, error: if (line6->disconnect) - line6->disconnect(interface); + line6->disconnect(line6); snd_card_free(card); return ret; } @@ -592,7 +593,7 @@ void line6_disconnect(struct usb_interface *interface) if (line6->line6pcm) line6_pcm_disconnect(line6->line6pcm); if (line6->disconnect) - line6->disconnect(interface); + line6->disconnect(line6); dev_info(&interface->dev, "Line 6 %s now disconnected\n", line6->properties->name); |