Skip to contentSkip to conversation

Staging: line6: convert to snd_card_create()

PATCH New Alexander Beregalov 1 participant 1 message Mar 29, 2009 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: line6: convert to snd_card_create()

---

 drivers/staging/line6/audio.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/staging/line6/audio.c +5 -4
index 3aa9468..e2ac8d6 100644
@@ -27,11 +27,12 @@ int line6_init_audio(struct usb_line6 *line6)
 {
 	static int dev;
 	struct snd_card *card;
+	int err;
 
-	card = snd_card_new(line6_index[dev], line6_id[dev], THIS_MODULE, 0);
-
-	if (card == NULL)
-		return -ENOMEM;
+	err = snd_card_create(line6_index[dev], line6_id[dev], THIS_MODULE, 0,
+			      &card);
+	if (err < 0)
+		return err;
 
 	line6->card = card;