ALSA: firewire: Convert to snd_card_new() with a device pointer
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jan 2014 13:23:55 +0000 (14:23 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 07:13:31 +0000 (08:13 +0100)
Also remove superfluous snd_card_set_dev() calls.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/dice.c
sound/firewire/isight.c
sound/firewire/scs1x.c
sound/firewire/speakers.c

index c0aa64941cee0bd927450a6b69314d14f2f02bce..0c3948630cf7ec2d5e4b5829f089e422121f93f8 100644 (file)
@@ -1326,10 +1326,10 @@ static int dice_probe(struct fw_unit *unit, const struct ieee1394_device_id *id)
        if (err < 0)
                return err;
 
-       err = snd_card_create(-1, NULL, THIS_MODULE, sizeof(*dice), &card);
+       err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE,
+                          sizeof(*dice), &card);
        if (err < 0)
                return err;
-       snd_card_set_dev(card, &unit->device);
 
        dice = card->private_data;
        dice->card = card;
index fd42e6b315e69d90e39deda16d553fc0baf97395..7ac94439e7584d8e973796dbc07a7032909f64c9 100644 (file)
@@ -631,10 +631,10 @@ static int isight_probe(struct fw_unit *unit,
        struct isight *isight;
        int err;
 
-       err = snd_card_create(-1, NULL, THIS_MODULE, sizeof(*isight), &card);
+       err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE,
+                          sizeof(*isight), &card);
        if (err < 0)
                return err;
-       snd_card_set_dev(card, &unit->device);
 
        isight = card->private_data;
        isight->card = card;
index 858023cf4298c0cbf6022e16824ab26f085f2b59..2dba848a781fd19f1fb2ca8c25bf2ff56fb0eabd 100644 (file)
@@ -391,10 +391,10 @@ static int scs_probe(struct fw_unit *unit, const struct ieee1394_device_id *id)
        struct scs *scs;
        int err;
 
-       err = snd_card_create(-16, NULL, THIS_MODULE, sizeof(*scs), &card);
+       err = snd_card_new(&unit->device, -16, NULL, THIS_MODULE,
+                          sizeof(*scs), &card);
        if (err < 0)
                return err;
-       snd_card_set_dev(card, &unit->device);
 
        scs = card->private_data;
        scs->card = card;
index cc8bc3a51bc147ab7a13c0a38ec84134b55f9da3..9f7ef219b109d52037c89672a608df990bab0c5c 100644 (file)
@@ -668,10 +668,10 @@ static int fwspk_probe(struct fw_unit *unit,
        u32 firmware;
        int err;
 
-       err = snd_card_create(-1, NULL, THIS_MODULE, sizeof(*fwspk), &card);
+       err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE,
+                          sizeof(*fwspk), &card);
        if (err < 0)
                return err;
-       snd_card_set_dev(card, &unit->device);
 
        fwspk = card->private_data;
        fwspk->card = card;