From b029a94056e748b39cdf2062c70baf1bac70781e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 29 Jan 2014 15:02:40 +0100 Subject: staging/line6: Convert to snd_card_new() with a device pointer Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai --- drivers/staging/line6/audio.c | 5 +++-- drivers/staging/line6/midi.c | 2 -- drivers/staging/line6/pcm.c | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/staging') diff --git a/drivers/staging/line6/audio.c b/drivers/staging/line6/audio.c index a92e21f7d55b..171d80c1b020 100644 --- a/drivers/staging/line6/audio.c +++ b/drivers/staging/line6/audio.c @@ -24,8 +24,9 @@ int line6_init_audio(struct usb_line6 *line6) struct snd_card *card; int err; - err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, - THIS_MODULE, 0, &card); + err = snd_card_new(line6->ifcdev, + SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, + THIS_MODULE, 0, &card); if (err < 0) return err; diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c index 3f6d78c585fb..c61cd0515baf 100644 --- a/drivers/staging/line6/midi.c +++ b/drivers/staging/line6/midi.c @@ -307,8 +307,6 @@ int line6_init_midi(struct usb_line6 *line6) if (err < 0) return err; - snd_card_set_dev(line6->card, line6->ifcdev); - err = snd_line6_new_midi(line6midi); if (err < 0) return err; diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index df8331bce175..661080b3c39d 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c @@ -501,8 +501,6 @@ int line6_init_pcm(struct usb_line6 *line6, if (err < 0) return err; - snd_card_set_dev(line6->card, line6->ifcdev); - err = snd_line6_new_pcm(line6pcm); if (err < 0) return err; -- cgit v1.2.3 From 3a3d2afd0844e00b29c8edf91595374c5b5c4dcc Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 29 Jan 2014 15:03:37 +0100 Subject: staging/media: Convert to snd_card_new() with a device pointer Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai --- drivers/staging/media/go7007/snd-go7007.c | 5 ++--- drivers/staging/media/solo6x10/solo6x10-g723.c | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers/staging') diff --git a/drivers/staging/media/go7007/snd-go7007.c b/drivers/staging/media/go7007/snd-go7007.c index 16dd64920767..9eb2a20ae40a 100644 --- a/drivers/staging/media/go7007/snd-go7007.c +++ b/drivers/staging/media/go7007/snd-go7007.c @@ -245,8 +245,8 @@ int go7007_snd_init(struct go7007 *go) spin_lock_init(&gosnd->lock); gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0; gosnd->capturing = 0; - ret = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, - &gosnd->card); + ret = snd_card_new(go->dev, index[dev], id[dev], THIS_MODULE, 0, + &gosnd->card); if (ret < 0) { kfree(gosnd); return ret; @@ -257,7 +257,6 @@ int go7007_snd_init(struct go7007 *go) kfree(gosnd); return ret; } - snd_card_set_dev(gosnd->card, go->dev); ret = snd_pcm_new(gosnd->card, "go7007", 0, 0, 1, &gosnd->pcm); if (ret < 0) { snd_card_free(gosnd->card); diff --git a/drivers/staging/media/solo6x10/solo6x10-g723.c b/drivers/staging/media/solo6x10/solo6x10-g723.c index 1db18c7972a0..74f037b6166c 100644 --- a/drivers/staging/media/solo6x10/solo6x10-g723.c +++ b/drivers/staging/media/solo6x10/solo6x10-g723.c @@ -366,8 +366,9 @@ int solo_g723_init(struct solo_dev *solo_dev) /* Allows for easier mapping between video and audio */ sprintf(name, "Softlogic%d", solo_dev->vfd->num); - ret = snd_card_create(SNDRV_DEFAULT_IDX1, name, THIS_MODULE, 0, - &solo_dev->snd_card); + ret = snd_card_new(&solo_dev->pdev->dev, + SNDRV_DEFAULT_IDX1, name, THIS_MODULE, 0, + &solo_dev->snd_card); if (ret < 0) return ret; @@ -377,7 +378,6 @@ int solo_g723_init(struct solo_dev *solo_dev) strcpy(card->shortname, "SOLO-6x10 Audio"); sprintf(card->longname, "%s on %s IRQ %d", card->shortname, pci_name(solo_dev->pdev), solo_dev->pdev->irq); - snd_card_set_dev(card, &solo_dev->pdev->dev); ret = snd_device_new(card, SNDRV_DEV_LOWLEVEL, solo_dev, &ops); if (ret < 0) -- cgit v1.2.3