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>
This commit is contained in:
@@ -157,7 +157,7 @@ struct usb_line6 {
|
||||
int message_length;
|
||||
|
||||
void (*process_message)(struct usb_line6 *);
|
||||
void (*disconnect)(struct usb_interface *);
|
||||
void (*disconnect)(struct usb_line6 *line6);
|
||||
};
|
||||
|
||||
extern char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1,
|
||||
@@ -180,9 +180,11 @@ extern int line6_write_data(struct usb_line6 *line6, int address, void *data,
|
||||
size_t datalen);
|
||||
|
||||
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));
|
||||
|
||||
void line6_disconnect(struct usb_interface *interface);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
Viittaa uudesa ongelmassa
Block a user