aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-11-20 12:37:49 -0500
committerMark Brown <broonie@linaro.org>2013-11-24 08:46:39 -0500
commitf58c4fc4a3bf9eb699a638634d20ef4d16069366 (patch)
tree67ff9bdd4000d8a043f82af52023019a9c08732b /sound/soc
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
ASoC: wm8580: Use IS_ENABLED() macro
Using the IS_ENABLED() macro can make the code shorter and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8580.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 08a414b57b1e..318989acbbe5 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -941,7 +941,7 @@ static const struct regmap_config wm8580_regmap = {
941 .volatile_reg = wm8580_volatile, 941 .volatile_reg = wm8580_volatile,
942}; 942};
943 943
944#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 944#if IS_ENABLED(CONFIG_I2C)
945static int wm8580_i2c_probe(struct i2c_client *i2c, 945static int wm8580_i2c_probe(struct i2c_client *i2c,
946 const struct i2c_device_id *id) 946 const struct i2c_device_id *id)
947{ 947{
@@ -1003,7 +1003,7 @@ static int __init wm8580_modinit(void)
1003{ 1003{
1004 int ret = 0; 1004 int ret = 0;
1005 1005
1006#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 1006#if IS_ENABLED(CONFIG_I2C)
1007 ret = i2c_add_driver(&wm8580_i2c_driver); 1007 ret = i2c_add_driver(&wm8580_i2c_driver);
1008 if (ret != 0) { 1008 if (ret != 0) {
1009 pr_err("Failed to register WM8580 I2C driver: %d\n", ret); 1009 pr_err("Failed to register WM8580 I2C driver: %d\n", ret);
@@ -1016,7 +1016,7 @@ module_init(wm8580_modinit);
1016 1016
1017static void __exit wm8580_exit(void) 1017static void __exit wm8580_exit(void)
1018{ 1018{
1019#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 1019#if IS_ENABLED(CONFIG_I2C)
1020 i2c_del_driver(&wm8580_i2c_driver); 1020 i2c_del_driver(&wm8580_i2c_driver);
1021#endif 1021#endif
1022} 1022}