[alsa-devel] [PATCH 01/11] soc - s3c24xx-i2s - Use linux/io.h
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/s3c24xx/s3c24xx-i2s.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c index 0de211c..c95ebe2 100644 --- a/sound/soc/s3c24xx/s3c24xx-i2s.c +++ b/sound/soc/s3c24xx/s3c24xx-i2s.c @@ -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>
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/s3c24xx/s3c24xx-i2s.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c index c95ebe2..36de130 100644 --- a/sound/soc/s3c24xx/s3c24xx-i2s.c +++ b/sound/soc/s3c24xx/s3c24xx-i2s.c @@ -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);
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/s3c24xx/s3c24xx-i2s.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c index 36de130..b433297 100644 --- a/sound/soc/s3c24xx/s3c24xx-i2s.c +++ b/sound/soc/s3c24xx/s3c24xx-i2s.c @@ -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);
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/pxa/pxa2xx-ac97.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index 95ae509..3f56fb1 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c @@ -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;
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/pxa/corgi.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 1a70a6a..7f32a11 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -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);
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/pxa/poodle.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index 4fbf8bb..7e830b2 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c @@ -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;
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/pxa/spitz.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index ecca390..d8b8372 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -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;
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/pxa/pxa2xx-pcm.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index daeaa4c..01ad7bf 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c @@ -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");
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/ac97.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 242130c..75670b3 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -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");
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/wm8731.c | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 9c33fe8..0cf9265 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -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");
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/wm8750.c | 27 +++++++++++++-------------- 1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 77a857b..16cd5d4 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -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");
At Wed, 23 Apr 2008 13:08:03 +0100, Mark Brown wrote:
@@ -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
At Wed, 23 Apr 2008 13:18:07 +0100, Mark Brown wrote:
On Wed, Apr 23, 2008 at 02:16:19PM +0200, Takashi Iwai wrote:
Mark Brown wrote:
- if (codec == NULL)
Actually, "if (!codec)" is a preferred form.
checkpatch doesn't complain about that :)
It might do in future :)
Takashi
Also change some if (x == NULL) to if (!x).
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/ac97.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 242130c..2a1ffe3 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -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");
At Wed, 23 Apr 2008 13:25:21 +0100, Mark Brown wrote:
Also change some if (x == NULL) to if (!x).
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com
Thanks. Applied all patches now to ALSA tree.
Takashi
participants (2)
-
Mark Brown
-
Takashi Iwai