soc - s3c24xx-i2s - Use linux/io.h
Subsystems (4)
PATCH 1/11 soc - s3c24xx-i2s - Use linux/io.h
--- sound/soc/s3c24xx/s3c24xx-i2s.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/s3c24xx-i2s.c +1 -1
@@ -25,6 +25,7 @@#include <linux/delay.h> #include <linux/clk.h> #include <linux/jiffies.h> +#include <linux/io.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/pcm_params.h>
@@ -32,7 +33,6 @@#include <sound/soc.h> #include <asm/hardware.h> -#include <asm/io.h> #include <asm/arch/regs-gpio.h> #include <asm/arch/regs-clock.h> #include <asm/arch/audio.h>
Signature · 1 line
1.5.5.1
PATCH 2/11 soc - s3c24xx-i2s - Fix tab/space breakage
--- sound/soc/s3c24xx/s3c24xx-i2s.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/s3c24xx/s3c24xx-i2s.c +4 -4
@@ -159,10 +159,10 @@ static void s3c24xx_snd_rxctrl(int on)* DMA engine will simply freeze randomly. */ - iisfcon &= ~S3C2410_IISFCON_RXENABLE ; - iisfcon &= ~S3C2410_IISFCON_RXDMA ; - iiscon |=S3C2410_IISCON_RXIDLE ; - iiscon &= ~S3C2410_IISCON_RXDMAEN ; + iisfcon &= ~S3C2410_IISFCON_RXENABLE ; + iisfcon &= ~S3C2410_IISFCON_RXDMA ; + iiscon |=S3C2410_IISCON_RXIDLE ; + iiscon &= ~S3C2410_IISCON_RXDMAEN ; iismod &= ~S3C2410_IISMOD_RXMODE ;writel (iisfcon, s3c24xx_i2s.regs +S3C2410_IISFCON );
Signature · 1 line
1.5.5.1
PATCH 3/11 soc - s3c24xx-i2s - Add missing spaces
--- sound/soc/s3c24xx/s3c24xx-i2s.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/s3c24xx-i2s.c +1 -1
@@ -388,7 +388,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev)if (s3c24xx_i2s.regs ==NULL )return -ENXIO ; - s3c24xx_i2s.iis_clk=clk_get (&pdev->dev,"iis" ); + s3c24xx_i2s.iis_clk =clk_get (&pdev->dev,"iis" );if (s3c24xx_i2s.iis_clk ==NULL ) {DBG ("failed to get iis_clock\n" );iounmap (s3c24xx_i2s.regs);
Signature · 1 line
1.5.5.1
PATCH 4/11 soc - pxa2xx-ac97 - Use __func__ not __FUNCTION__
--- sound/soc/pxa/pxa2xx-ac97.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/pxa/pxa2xx-ac97.c +4 -4
@@ -81,7 +81,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97,wait_event_timeout (gsr_wq, (GSR | gsr_bits) &GSR_SDONE ,1 );if (!((GSR | gsr_bits) &GSR_SDONE )) {printk (KERN_ERR "%s: read error (ac97_reg=%x GSR=%#lx)\n" , - __FUNCTION__, reg,GSR | gsr_bits); + __func__, reg,GSR | gsr_bits); val =-1 ; goto out; }
@@ -121,7 +121,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg,wait_event_timeout (gsr_wq, (GSR | gsr_bits) &GSR_CDONE ,1 );if (!((GSR | gsr_bits) &GSR_CDONE ))printk (KERN_ERR "%s: write error (ac97_reg=%x GSR=%#lx)\n" , - __FUNCTION__, reg,GSR | gsr_bits); + __func__, reg,GSR | gsr_bits);mutex_unlock (&car_mutex); }
@@ -153,7 +153,7 @@ static void pxa2xx_ac97_warm_reset(struct snd_ac97 *ac97)if (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR )))printk (KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n" , - __FUNCTION__, gsr_bits); + __func__, gsr_bits);GCR &= ~(GCR_PRIRDY_IEN |GCR_SECRDY_IEN );GCR |=GCR_SDONE_IE |GCR_CDONE_IE ;
@@ -197,7 +197,7 @@ static void pxa2xx_ac97_cold_reset(struct snd_ac97 *ac97)if (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR )))printk (KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n" , - __FUNCTION__, gsr_bits); + __func__, gsr_bits);GCR &= ~(GCR_PRIRDY_IEN |GCR_SECRDY_IEN );GCR |=GCR_SDONE_IE |GCR_CDONE_IE ;
Signature · 1 line
1.5.5.1
PATCH 5/11 soc - corgi - Fix checkpatch warnings
--- sound/soc/pxa/corgi.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
sound/soc/pxa/corgi.c +5 -6
@@ -297,21 +297,19 @@ static int corgi_wm8731_init(struct snd_soc_codec *codec)/* Add corgi specific controls */ for (i =0 ; i <ARRAY_SIZE (wm8731_corgi_controls); i++) { err =snd_ctl_add (codec->card, -snd_soc_cnew (&wm8731_corgi_controls[i],codec,NULL )); +snd_soc_cnew (&wm8731_corgi_controls[i], codec,NULL ));if (err <0 )return err; }/* Add corgi specific widgets */ -for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++) { +for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++)snd_soc_dapm_new_control (codec, &wm8731_dapm_widgets[i]); - }/* Set up corgi specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { +for (i =0 ; audio_map[i][0 ] !=NULL ; i++)snd_soc_dapm_connect_input (codec, audio_map[i][0 ], audio_map[i][1 ], audio_map[i][2 ]); - }snd_soc_dapm_sync_endpoints (codec);return 0 ;
@@ -353,7 +351,8 @@ static int __init corgi_init(void) {int ret; -if (!(machine_is_corgi () ||machine_is_shepherd () ||machine_is_husky ())) +if (!(machine_is_corgi () ||machine_is_shepherd () || +machine_is_husky ()))return -ENODEV ; corgi_snd_device =platform_device_alloc ("soc-audio" ,-1 );
Signature · 1 line
1.5.5.1
PATCH 6/11 soc - poodle - Fix checkpatch warnings
--- sound/soc/pxa/poodle.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
sound/soc/pxa/poodle.c +3 -5
@@ -257,21 +257,19 @@ static int poodle_wm8731_init(struct snd_soc_codec *codec)/* Add poodle specific controls */ for (i =0 ; i <ARRAY_SIZE (wm8731_poodle_controls); i++) { err =snd_ctl_add (codec->card, -snd_soc_cnew (&wm8731_poodle_controls[i],codec,NULL )); +snd_soc_cnew (&wm8731_poodle_controls[i], codec,NULL ));if (err <0 )return err; }/* Add poodle specific widgets */ -for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++) { +for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++)snd_soc_dapm_new_control (codec, &wm8731_dapm_widgets[i]); - }/* Set up poodle specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { +for (i =0 ; audio_map[i][0 ] !=NULL ; i++)snd_soc_dapm_connect_input (codec, audio_map[i][0 ], audio_map[i][1 ], audio_map[i][2 ]); - }snd_soc_dapm_sync_endpoints (codec);return 0 ;
Signature · 1 line
1.5.5.1
PATCH 7/11 soc - spitz - Fix checkpatch warnings
--- sound/soc/pxa/spitz.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
sound/soc/pxa/spitz.c +2 -4
@@ -313,15 +313,13 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec) }/* Add spitz specific widgets */ -for (i =0 ; i <ARRAY_SIZE (wm8750_dapm_widgets); i++) { +for (i =0 ; i <ARRAY_SIZE (wm8750_dapm_widgets); i++)snd_soc_dapm_new_control (codec, &wm8750_dapm_widgets[i]); - }/* Set up spitz specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { +for (i =0 ; audio_map[i][0 ] !=NULL ; i++)snd_soc_dapm_connect_input (codec, audio_map[i][0 ], audio_map[i][1 ], audio_map[i][2 ]); - }snd_soc_dapm_sync_endpoints (codec);return 0 ;
Signature · 1 line
1.5.5.1
PATCH 8/11 soc - pxa2xx-pcm - Fix checkpatch warnings
--- sound/soc/pxa/pxa2xx-pcm.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
sound/soc/pxa/pxa2xx-pcm.c +4 -5
@@ -64,8 +64,8 @@ static void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id)if (dcsr &DCSR_ENDINTR ) {snd_pcm_period_elapsed (substream); }else { -printk (KERN_ERR "%s: DMA error on channel %d (DCSR=%#x)\n" , - prtd->params->name, dma_ch, dcsr ); +printk (KERN_ERR "%s: DMA error on channel %d (DCSR=%#x)\n" , + prtd->params->name, dma_ch, dcsr); } }
@@ -84,8 +84,8 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,/* return if this is a bufferless transfer e.g. * codec <--> BT codec or GSM modem -- lg FIXME */ -if (!dma) -return 0 ; +if (!dma) +return 0 ;/* this may get called several times by oss emulation * with different params */
@@ -363,7 +363,6 @@ struct snd_soc_platform pxa2xx_soc_platform = { .pcm_new = pxa2xx_pcm_new, .pcm_free = pxa2xx_pcm_free_dma_buffers, }; -EXPORT_SYMBOL_GPL (pxa2xx_soc_platform);MODULE_AUTHOR ("Nicolas Pitre" );
Signature · 1 line
1.5.5.1
PATCH 9/11 soc - ac97 - Clean up checkpatch warnings
--- sound/soc/codecs/ac97.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
sound/soc/codecs/ac97.c +7 -7
@@ -40,7 +40,8 @@ static int ac97_prepare(struct snd_pcm_substream *substream) }#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ - SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) + SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\ + SNDRV_PCM_RATE_48000)struct snd_soc_codec_dai ac97_dai = { .name ="AC97 HiFi" ,
@@ -102,17 +103,17 @@ static int ac97_soc_probe(struct platform_device *pdev)/* register pcms */ ret =snd_soc_new_pcms (socdev,SNDRV_DEFAULT_IDX1 ,SNDRV_DEFAULT_STR1 ); -if (ret <0 ) +if (ret <0 ) goto err;/* add codec as bus device for standard ac97 */ ret =snd_ac97_bus (codec->card,0 , &soc_ac97_ops,NULL , &ac97_bus); -if (ret <0 ) +if (ret <0 ) goto bus_err;memset (&ac97_template,0 ,sizeof (struct snd_ac97_template )); ret =snd_ac97_mixer (ac97_bus, &ac97_template, &codec->ac97); -if (ret <0 ) +if (ret <0 ) goto bus_err; ret =snd_soc_register_card (socdev);
@@ -135,7 +136,7 @@ static int ac97_soc_remove(struct platform_device *pdev)struct snd_soc_device *socdev =platform_get_drvdata (pdev);struct snd_soc_codec *codec = socdev->codec; -if (codec ==NULL ) +if (codec ==NULL )return 0 ;snd_soc_free_pcms (socdev);
@@ -145,11 +146,10 @@ static int ac97_soc_remove(struct platform_device *pdev)return 0 ; } -struct snd_soc_codec_device soc_codec_dev_ac97= { +struct snd_soc_codec_device soc_codec_dev_ac97 = { .probe = ac97_soc_probe, .remove = ac97_soc_remove, }; -EXPORT_SYMBOL_GPL (soc_codec_dev_ac97);MODULE_DESCRIPTION ("Soc Generic AC97 driver" );
Signature · 1 line
1.5.5.1
PATCH 10/11 soc - wm8731 - Clean up checkpatch warnings
--- sound/soc/codecs/wm8731.c | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-)
sound/soc/codecs/wm8731.c +11 -12
@@ -110,7 +110,7 @@ static int wm8731_write(struct snd_soc_codec *codec, unsigned int reg, data[0 ] = (reg <<1 ) | ((value >>8 ) &0x0001 ); data[1 ] = value &0x00ff ; -wm8731_write_reg_cache (codec, reg, value); +wm8731_write_reg_cache (codec, reg, value);if (codec->hw_write (codec->control_data, data,2 ) ==2 )return 0 ;else
@@ -154,8 +154,10 @@ static int wm8731_add_controls(struct snd_soc_codec *codec)int err, i;for (i =0 ; i <ARRAY_SIZE (wm8731_snd_controls); i++) { -if ((err =snd_ctl_add (codec->card, -snd_soc_cnew (&wm8731_snd_controls[i],codec,NULL ))) <0 ) + err =snd_ctl_add (codec->card, +snd_soc_cnew (&wm8731_snd_controls[i], + codec,NULL )); +if (err <0 )return err; }
@@ -221,15 +223,13 @@ static int wm8731_add_widgets(struct snd_soc_codec *codec) {int i; -for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++) { +for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++)snd_soc_dapm_new_control (codec, &wm8731_dapm_widgets[i]); - }/* set up audio path interconnects */ -for (i =0 ; intercon[i][0 ] !=NULL ; i++) { +for (i =0 ; intercon[i][0 ] !=NULL ; i++)snd_soc_dapm_connect_input (codec, intercon[i][0 ], intercon[i][1 ], intercon[i][2 ]); - }snd_soc_dapm_new_widgets (codec);return 0 ;
@@ -589,7 +589,7 @@ pcm_err:static struct snd_soc_device *wm8731_socdev; -#if defined (CONFIG_I2C ) || defined (CONFIG_I2C_MODULE ) +#if defined(CONFIG_I2C ) || defined(CONFIG_I2C_MODULE )/* * WM8731 2 wire address is determined by GPIO5
@@ -651,7 +651,7 @@ err:static int wm8731_i2c_detach (struct i2c_client *client) { -struct snd_soc_codec * codec =i2c_get_clientdata (client); +struct snd_soc_codec *codec =i2c_get_clientdata (client);i2c_detach_client (client);kfree (codec->reg_cache);kfree (client);
@@ -709,7 +709,7 @@ static int wm8731_probe(struct platform_device *pdev)INIT_LIST_HEAD (&codec->dapm_paths); wm8731_socdev = socdev; -#if defined (CONFIG_I2C ) || defined (CONFIG_I2C_MODULE ) +#if defined(CONFIG_I2C ) || defined(CONFIG_I2C_MODULE )if (setup->i2c_address) { normal_i2c[0 ] = setup->i2c_address; codec->hw_write = (hw_write_t )i2c_master_send;
@@ -734,7 +734,7 @@ static int wm8731_remove(struct platform_device *pdev)snd_soc_free_pcms (socdev);snd_soc_dapm_free (socdev); -#if defined (CONFIG_I2C ) || defined (CONFIG_I2C_MODULE ) +#if defined(CONFIG_I2C ) || defined(CONFIG_I2C_MODULE )i2c_del_driver (&wm8731_i2c_driver);#endif kfree (codec->private_data);
@@ -749,7 +749,6 @@ struct snd_soc_codec_device soc_codec_dev_wm8731 = { .suspend = wm8731_suspend, .resume = wm8731_resume, }; -EXPORT_SYMBOL_GPL (soc_codec_dev_wm8731);MODULE_DESCRIPTION ("ASoC WM8731 driver" );
Signature · 1 line
1.5.5.1
PATCH 11/11 soc - wm8750 - Clean up checkpatch warnings
--- sound/soc/codecs/wm8750.c | 27 +++++++++++++-------------- 1 files changed, 13 insertions(+), 14 deletions(-)
sound/soc/codecs/wm8750.c +13 -14
@@ -110,7 +110,7 @@ static int wm8750_write(struct snd_soc_codec *codec, unsigned int reg, data[0 ] = (reg <<1 ) | ((value >>8 ) &0x0001 ); data[1 ] = value &0x00ff ; -wm8750_write_reg_cache (codec, reg, value); +wm8750_write_reg_cache (codec, reg, value);if (codec->hw_write (codec->control_data, data,2 ) ==2 )return 0 ;else
@@ -257,7 +257,8 @@ static int wm8750_add_controls(struct snd_soc_codec *codec)for (i =0 ; i <ARRAY_SIZE (wm8750_snd_controls); i++) { err =snd_ctl_add (codec->card, -snd_soc_cnew (&wm8750_snd_controls[i],codec,NULL )); +snd_soc_cnew (&wm8750_snd_controls[i], + codec,NULL ));if (err <0 )return err; }
@@ -478,15 +479,13 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec) {int i; -for (i =0 ; i <ARRAY_SIZE (wm8750_dapm_widgets); i++) { +for (i =0 ; i <ARRAY_SIZE (wm8750_dapm_widgets); i++)snd_soc_dapm_new_control (codec, &wm8750_dapm_widgets[i]); - }/* set up audio path audio_mapnects */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { +for (i =0 ; audio_map[i][0 ] !=NULL ; i++)snd_soc_dapm_connect_input (codec, audio_map[i][0 ], audio_map[i][1 ], audio_map[i][2 ]); - }snd_soc_dapm_new_widgets (codec);return 0 ;
@@ -714,8 +713,8 @@ static int wm8750_dapm_event(struct snd_soc_codec *codec, int event) }#define WM8750_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ - SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ - SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) + SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ + SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)#define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE)
@@ -784,7 +783,8 @@ static int wm8750_resume(struct platform_device *pdev)if (codec->suspend_dapm_state ==SNDRV_CTL_POWER_D0 ) {wm8750_dapm_event (codec,SNDRV_CTL_POWER_D2 ); codec->dapm_state =SNDRV_CTL_POWER_D0 ; -schedule_delayed_work (&codec->delayed_work,msecs_to_jiffies (1000 )); +schedule_delayed_work (&codec->delayed_work, +msecs_to_jiffies (1000 )); }return 0 ;
@@ -864,7 +864,7 @@ pcm_err:around */ static struct snd_soc_device *wm8750_socdev; -#if defined (CONFIG_I2C ) || defined (CONFIG_I2C_MODULE ) +#if defined(CONFIG_I2C ) || defined(CONFIG_I2C_MODULE )/* * WM8731 2 wire address is determined by GPIO5
@@ -979,8 +979,8 @@ static int wm8750_probe(struct platform_device *pdev)INIT_LIST_HEAD (&codec->dapm_paths); wm8750_socdev = socdev;INIT_DELAYED_WORK (&codec->delayed_work, wm8750_work); - -#if defined (CONFIG_I2C ) || defined (CONFIG_I2C_MODULE ) + +#if defined(CONFIG_I2C ) || defined(CONFIG_I2C_MODULE )if (setup->i2c_address) { normal_i2c[0 ] = setup->i2c_address; codec->hw_write = (hw_write_t )i2c_master_send;
@@ -1025,7 +1025,7 @@ static int wm8750_remove(struct platform_device *pdev)run_delayed_work (&codec->delayed_work);snd_soc_free_pcms (socdev);snd_soc_dapm_free (socdev); -#if defined (CONFIG_I2C ) || defined (CONFIG_I2C_MODULE ) +#if defined(CONFIG_I2C ) || defined(CONFIG_I2C_MODULE )i2c_del_driver (&wm8750_i2c_driver);#endif kfree (codec->private_data);
@@ -1040,7 +1040,6 @@ struct snd_soc_codec_device soc_codec_dev_wm8750 = { .suspend = wm8750_suspend, .resume = wm8750_resume, }; -EXPORT_SYMBOL_GPL (soc_codec_dev_wm8750);MODULE_DESCRIPTION ("ASoC WM8750 driver" );
Signature · 1 line
1.5.5.1
Re: [PATCH 09/11] soc - ac97 - Clean up checkpatch warnings
In reply to Mark BrownAt Wed, 23 Apr 2008 13:08:03 +0100,
sound/soc/codecs/ac97.c static int ac97_soc_remove(struct platform_device *pdev) · line 139
Quoted 7 lines · Mark Brown
sound/soc/codecs/ac97.c +1
-1@@ -135,7 +136,7 @@ static int ac97_soc_remove(struct platform_device *pdev)struct snd_soc_device *socdev =platform_get_drvdata (pdev);struct snd_soc_codec *codec = socdev->codec; -if (codec ==NULL ) +if (codec ==NULL )
Actually, "if (!codec)" is a preferred form.
Takashi
Re: [PATCH 09/11] soc - ac97 - Clean up checkpatch warnings
Quoted 5 lines · Takashi Iwai
sound/soc/codecs/ac97.c static int ac97_soc_remove(struct platform_device *pdev) · line 139
Quoted 1 line · Mark Brown
sound/soc/codecs/ac97.c +1
-0+if (codec ==NULL )Actually, "if (!codec)" is a preferred form.
checkpatch doesn't complain about that :)
Re: [PATCH 09/11] soc - ac97 - Clean up checkpatch warnings
At Wed, 23 Apr 2008 13:18:07 +0100,
Quoted 9 lines · Mark Brown
Quoted 5 lines · Takashi Iwai
sound/soc/codecs/ac97.c static int ac97_soc_remove(struct platform_device *pdev) · line 139
Quoted 1 line · Mark Brown
sound/soc/codecs/ac97.c +1
-0+if (codec ==NULL )Actually, "if (!codec)" is a preferred form.
checkpatch doesn't complain about that :)
It might do in future :)
Takashi
PATCH 1/1 soc - ac97 - Clean up checkpatch warnings
In reply to Takashi IwaiAlso change some if (x == NULL) to if (!x).
--- sound/soc/codecs/ac97.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
sound/soc/codecs/ac97.c +8 -8
@@ -40,7 +40,8 @@ static int ac97_prepare(struct snd_pcm_substream *substream) }#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ - SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) + SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\ + SNDRV_PCM_RATE_48000)struct snd_soc_codec_dai ac97_dai = { .name ="AC97 HiFi" ,
@@ -86,7 +87,7 @@ static int ac97_soc_probe(struct platform_device *pdev)printk (KERN_INFO "AC97 SoC Audio Codec %s\n" ,AC97_VERSION ); socdev->codec =kzalloc (sizeof (struct snd_soc_codec ),GFP_KERNEL ); -if (socdev->codec ==NULL ) +if (!socdev->codec)return -ENOMEM ; codec = socdev->codec;mutex_init (&codec->mutex);
@@ -102,17 +103,17 @@ static int ac97_soc_probe(struct platform_device *pdev)/* register pcms */ ret =snd_soc_new_pcms (socdev,SNDRV_DEFAULT_IDX1 ,SNDRV_DEFAULT_STR1 ); -if (ret <0 ) +if (ret <0 ) goto err;/* add codec as bus device for standard ac97 */ ret =snd_ac97_bus (codec->card,0 , &soc_ac97_ops,NULL , &ac97_bus); -if (ret <0 ) +if (ret <0 ) goto bus_err;memset (&ac97_template,0 ,sizeof (struct snd_ac97_template )); ret =snd_ac97_mixer (ac97_bus, &ac97_template, &codec->ac97); -if (ret <0 ) +if (ret <0 ) goto bus_err; ret =snd_soc_register_card (socdev);
@@ -135,7 +136,7 @@ static int ac97_soc_remove(struct platform_device *pdev)struct snd_soc_device *socdev =platform_get_drvdata (pdev);struct snd_soc_codec *codec = socdev->codec; -if (codec ==NULL ) +if (!codec)return 0 ;snd_soc_free_pcms (socdev);
@@ -145,11 +146,10 @@ static int ac97_soc_remove(struct platform_device *pdev)return 0 ; } -struct snd_soc_codec_device soc_codec_dev_ac97= { +struct snd_soc_codec_device soc_codec_dev_ac97 = { .probe = ac97_soc_probe, .remove = ac97_soc_remove, }; -EXPORT_SYMBOL_GPL (soc_codec_dev_ac97);MODULE_DESCRIPTION ("Soc Generic AC97 driver" );
Signature · 1 line
1.5.5.1
Re: [PATCH] soc - ac97 - Clean up checkpatch warnings
At Wed, 23 Apr 2008 13:25:21 +0100,
Quoted 4 lines · Mark Brown
Also change some if (x == NULL) to if (!x).
Signed-off-by Mark Brown <[email protected]>
Thanks. Applied all patches now to ALSA tree.
Takashi