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/pod.c | |
parent | ALSA: line6: Skip volume manipulation during silence copying (diff) | |
download | linux-dev-f66fd990c5db177d6b9f0eae301ca6b15882eb2e.tar.xz linux-dev-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/pod.c')
-rw-r--r-- | sound/usb/line6/pod.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c index 26ecf26a33ec..d1e952fbcae7 100644 --- a/sound/usb/line6/pod.c +++ b/sound/usb/line6/pod.c @@ -399,10 +399,10 @@ static struct snd_kcontrol_new pod_control_monitor = { /* POD device disconnected. */ -static void line6_pod_disconnect(struct usb_interface *interface) +static void line6_pod_disconnect(struct usb_line6 *line6) { - struct usb_line6_pod *pod = usb_get_intfdata(interface); - struct device *dev = &interface->dev; + struct usb_line6_pod *pod = (struct usb_line6_pod *)line6; + struct device *dev = line6->ifcdev; /* remove sysfs entries: */ device_remove_file(dev, &dev_attr_device_id); @@ -435,8 +435,8 @@ static int pod_create_files2(struct device *dev) /* Try to init POD device. */ -static int pod_init(struct usb_interface *interface, - struct usb_line6 *line6) +static int pod_init(struct usb_line6 *line6, + const struct usb_device_id *id) { int err; struct usb_line6_pod *pod = (struct usb_line6_pod *) line6; @@ -448,7 +448,7 @@ static int pod_init(struct usb_interface *interface, INIT_WORK(&pod->startup_work, pod_startup4); /* create sysfs entries: */ - err = pod_create_files2(&interface->dev); + err = pod_create_files2(line6->ifcdev); if (err < 0) return err; @@ -596,7 +596,7 @@ static int pod_probe(struct usb_interface *interface, pod = kzalloc(sizeof(*pod), GFP_KERNEL); if (!pod) return -ENODEV; - return line6_probe(interface, &pod->line6, + return line6_probe(interface, id, &pod->line6, &pod_properties_table[id->driver_info], pod_init); } |