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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/sparc/amd7930.c
sound/sparc/cs4231.c
sound/sparc/dbri.c

index 174d21fb56e2e326246231b30ce589a90919a9ff..4a85e14334726e43f513a95a0e85e4fd4c5dd2cd 100644 (file)
@@ -1019,8 +1019,8 @@ static int amd7930_sbus_probe(struct platform_device *op)
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev_num], id[dev_num], THIS_MODULE, 0,
-                             &card);
+       err = snd_card_new(&op->dev, index[dev_num], id[dev_num],
+                          THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index dbb1b625eb2f59b5fd536fc33c0679b054095652..4e91bcaa36649943b430058d434dff5310c88cc3 100644 (file)
@@ -1565,7 +1565,8 @@ static int snd_cs4231_mixer(struct snd_card *card)
 
 static int dev;
 
-static int cs4231_attach_begin(struct snd_card **rcard)
+static int cs4231_attach_begin(struct platform_device *op,
+                              struct snd_card **rcard)
 {
        struct snd_card *card;
        struct snd_cs4231 *chip;
@@ -1581,8 +1582,8 @@ static int cs4231_attach_begin(struct snd_card **rcard)
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE,
-                             sizeof(struct snd_cs4231), &card);
+       err = snd_card_new(&op->dev, index[dev], id[dev], THIS_MODULE,
+                          sizeof(struct snd_cs4231), &card);
        if (err < 0)
                return err;
 
@@ -1869,7 +1870,7 @@ static int cs4231_sbus_probe(struct platform_device *op)
        struct snd_card *card;
        int err;
 
-       err = cs4231_attach_begin(&card);
+       err = cs4231_attach_begin(op, &card);
        if (err)
                return err;
 
@@ -2060,7 +2061,7 @@ static int cs4231_ebus_probe(struct platform_device *op)
        struct snd_card *card;
        int err;
 
-       err = cs4231_attach_begin(&card);
+       err = cs4231_attach_begin(op, &card);
        if (err)
                return err;
 
index eee7afcae37510db454f132c65f01ba5c34f776e..be1b1aa96b7ea2bd44d8ab0021a86eacb48a10e8 100644 (file)
@@ -2615,8 +2615,8 @@ static int dbri_probe(struct platform_device *op)
                return -ENODEV;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE,
-                             sizeof(struct snd_dbri), &card);
+       err = snd_card_new(&op->dev, index[dev], id[dev], THIS_MODULE,
+                          sizeof(struct snd_dbri), &card);
        if (err < 0)
                return err;