asoc: codecs: rt5639_ioctl: Fix warning messages
Philip Rakity [Tue, 9 Jul 2013 10:34:15 +0000 (11:34 +0100)]
Change-Id: I87a039c3f662b8aa99b6fe8340c6769b03427fca
Signed-off-by: Philip Rakity <prakity@nvidia.com>
Reviewed-on: http://git-master/r/246637
Reviewed-by: Vijay Mali <vmali@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>

sound/soc/codecs/rt5639_ioctl.c

index b168756..17feb50 100644 (file)
@@ -9,12 +9,13 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/module.h>
 #include <linux/spi/spi.h>
 #include <sound/soc.h>
 #include "rt56xx_ioctl.h"
 #include "rt5639_ioctl.h"
 #include "rt5639.h"
-#if (CONFIG_SND_SOC_RT5642_MODULE | CONFIG_SND_SOC_RT5642)
+#if defined(CONFIG_SND_SOC_RT5642_MODULE) || defined(CONFIG_SND_SOC_RT5642)
 #include "rt5639-dsp.h"
 #endif
 
@@ -168,7 +169,7 @@ void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
 {
        unsigned int reg = snd_soc_read(codec, RT5639_DRC_AGC_3);
 
-       dev_info("get_noise_gate reg=0x%04x\n", reg);
+       dev_info(codec->dev, "get_noise_gate reg=0x%04x\n", reg);
        *noise_gate_en = (reg & RT5639_DRC_AGC_NG_MASK) >>
                                RT5639_DRC_AGC_NG_SFT;
        *noise_gate_hold_en = (reg & RT5639_DRC_AGC_NGH_MASK) >>
@@ -447,7 +448,7 @@ int rt5639_ioctl_common(struct snd_hwdep *hw, struct file *file,
                if (copy_to_user(rt56xx.buf, buf, sizeof(*buf) * rt56xx.number))
                        goto err;
                break;
-#if (CONFIG_SND_SOC_RT5642_MODULE | CONFIG_SND_SOC_RT5642)
+#if defined(CONFIG_SND_SOC_RT5642_MODULE) || defined(CONFIG_SND_SOC_RT5642)
        case RT_READ_CODEC_DSP_IOCTL:
        case RT_WRITE_CODEC_DSP_IOCTL:
        case RT_GET_CODEC_DSP_MODE_IOCTL: