mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-03 18:20:25 +02:00 
			
		
		
		
	ALSA: sh: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									1076879744
								
							
						
					
					
						commit
						e7182ac5a3
					
				
					 2 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
					@ -608,8 +608,8 @@ static int snd_aica_probe(struct platform_device *devptr)
 | 
				
			||||||
	dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL);
 | 
						dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL);
 | 
				
			||||||
	if (unlikely(!dreamcastcard))
 | 
						if (unlikely(!dreamcastcard))
 | 
				
			||||||
		return -ENOMEM;
 | 
							return -ENOMEM;
 | 
				
			||||||
	err = snd_card_create(index, SND_AICA_DRIVER, THIS_MODULE, 0,
 | 
						err = snd_card_new(&devptr->dev, index, SND_AICA_DRIVER,
 | 
				
			||||||
			      &dreamcastcard->card);
 | 
								   THIS_MODULE, 0, &dreamcastcard->card);
 | 
				
			||||||
	if (unlikely(err < 0)) {
 | 
						if (unlikely(err < 0)) {
 | 
				
			||||||
		kfree(dreamcastcard);
 | 
							kfree(dreamcastcard);
 | 
				
			||||||
		return err;
 | 
							return err;
 | 
				
			||||||
| 
						 | 
					@ -624,7 +624,6 @@ static int snd_aica_probe(struct platform_device *devptr)
 | 
				
			||||||
	err = snd_aicapcmchip(dreamcastcard, 0);
 | 
						err = snd_aicapcmchip(dreamcastcard, 0);
 | 
				
			||||||
	if (unlikely(err < 0))
 | 
						if (unlikely(err < 0))
 | 
				
			||||||
		goto freedreamcast;
 | 
							goto freedreamcast;
 | 
				
			||||||
	snd_card_set_dev(dreamcastcard->card, &devptr->dev);
 | 
					 | 
				
			||||||
	dreamcastcard->timer.data = 0;
 | 
						dreamcastcard->timer.data = 0;
 | 
				
			||||||
	dreamcastcard->channel = NULL;
 | 
						dreamcastcard->channel = NULL;
 | 
				
			||||||
	/* Add basic controls */
 | 
						/* Add basic controls */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -396,7 +396,7 @@ static int snd_sh_dac_probe(struct platform_device *devptr)
 | 
				
			||||||
	struct snd_card *card;
 | 
						struct snd_card *card;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = snd_card_create(index, id, THIS_MODULE, 0, &card);
 | 
						err = snd_card_new(&devptr->dev, index, id, THIS_MODULE, 0, &card);
 | 
				
			||||||
	if (err < 0) {
 | 
						if (err < 0) {
 | 
				
			||||||
			snd_printk(KERN_ERR "cannot allocate the card\n");
 | 
								snd_printk(KERN_ERR "cannot allocate the card\n");
 | 
				
			||||||
			return err;
 | 
								return err;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue