diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-25 18:36:29 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-28 07:22:07 +0100 |
commit | aca514b82356dcc3575da33453382bd27593aea1 (patch) | |
tree | ccb08ee0c6142b905382df6d192375e5f53d257c /sound/usb/line6/podhd.c | |
parent | ALSA: line6: Drop interface argument from private_init and disconnect callbacks (diff) | |
download | linux-aca514b82356dcc3575da33453382bd27593aea1.tar.xz linux-aca514b82356dcc3575da33453382bd27593aea1.zip |
ALSA: line6: Let snd_card_new() allocate private data
Instead of allocating the private data individually in each driver's
probe at first, let snd_card_new() allocate the data that is called in
line6_probe(). This simplifies the primary probe functions.
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/podhd.c')
-rw-r--r-- | sound/usb/line6/podhd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/usb/line6/podhd.c b/sound/usb/line6/podhd.c index 21d7edcfa272..43c39886597e 100644 --- a/sound/usb/line6/podhd.c +++ b/sound/usb/line6/podhd.c @@ -177,14 +177,9 @@ static const struct line6_properties podhd_properties_table[] = { static int podhd_probe(struct usb_interface *interface, const struct usb_device_id *id) { - struct usb_line6_podhd *podhd; - - podhd = kzalloc(sizeof(*podhd), GFP_KERNEL); - if (!podhd) - return -ENODEV; - return line6_probe(interface, id, &podhd->line6, + return line6_probe(interface, id, &podhd_properties_table[id->driver_info], - podhd_init); + podhd_init, sizeof(struct usb_line6_podhd)); } static struct usb_driver podhd_driver = { |