alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] codecs: Use IS_ENABLED() macro
@ 2013-11-20 17:37 Fabio Estevam
  2013-11-20 17:37 ` [PATCH 01/11] wm8962: " Fabio Estevam
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Mark,

There are still more ocurrences that can be converted to IS_ENABLED.

If you are happy with this series I will send another one with the remaining
pieces.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 01/11] wm8962: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 02/11] soc-io.c: " Fabio Estevam
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/wm8962.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 543c5c2..07da601 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -74,7 +74,7 @@ struct wm8962_priv {
 	struct regulator_bulk_data supplies[WM8962_NUM_SUPPLIES];
 	struct notifier_block disable_nb[WM8962_NUM_SUPPLIES];
 
-#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
+#if IS_ENABLED(CONFIG_INPUT)
 	struct input_dev *beep;
 	struct work_struct beep_work;
 	int beep_rate;
@@ -3108,7 +3108,7 @@ int wm8962_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
 }
 EXPORT_SYMBOL_GPL(wm8962_mic_detect);
 
-#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
+#if IS_ENABLED(CONFIG_INPUT)
 static int beep_rates[] = {
 	500, 1000, 2000, 4000,
 };
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 02/11] soc-io.c: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
  2013-11-20 17:37 ` [PATCH 01/11] wm8962: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 03/11] ad193x: " Fabio Estevam
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/soc-io.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 4f11d23..aa886cc 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -99,14 +99,14 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
 	config.val_bits = data_bits;
 
 	switch (control) {
-#if defined(CONFIG_REGMAP_I2C) || defined(CONFIG_REGMAP_I2C_MODULE)
+#if IS_ENABLED(CONFIG_REGMAP_I2C)
 	case SND_SOC_I2C:
 		codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev),
 						      &config);
 		break;
 #endif
 
-#if defined(CONFIG_REGMAP_SPI) || defined(CONFIG_REGMAP_SPI_MODULE)
+#if IS_ENABLED(CONFIG_REGMAP_SPI)
 	case SND_SOC_SPI:
 		codec->control_data = regmap_init_spi(to_spi_device(codec->dev),
 						      &config);
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 03/11] ad193x: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
  2013-11-20 17:37 ` [PATCH 01/11] wm8962: " Fabio Estevam
  2013-11-20 17:37 ` [PATCH 02/11] soc-io.c: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-29  7:24   ` Scott Jiang
  2013-11-20 17:37 ` [PATCH 04/11] adav80x: " Fabio Estevam
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/ad193x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
index aea7e52..12c27eb 100644
--- a/sound/soc/codecs/ad193x.c
+++ b/sound/soc/codecs/ad193x.c
@@ -413,7 +413,7 @@ static struct spi_driver ad193x_spi_driver = {
 };
 #endif
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 
 static const struct regmap_config ad193x_i2c_regmap_config = {
 	.val_bits = 8,
@@ -470,7 +470,7 @@ static int __init ad193x_modinit(void)
 {
 	int ret;
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret =  i2c_add_driver(&ad193x_i2c_driver);
 	if (ret != 0) {
 		printk(KERN_ERR "Failed to register AD193X I2C driver: %d\n",
@@ -495,7 +495,7 @@ static void __exit ad193x_modexit(void)
 	spi_unregister_driver(&ad193x_spi_driver);
 #endif
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&ad193x_i2c_driver);
 #endif
 }
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 04/11] adav80x: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (2 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 03/11] ad193x: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` Fabio Estevam
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/adav80x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 14a7c16..f7bf455 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -939,7 +939,7 @@ static struct spi_driver adav80x_spi_driver = {
 };
 #endif
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static const struct regmap_config adav80x_i2c_regmap_config = {
 	.val_bits = 8,
 	.pad_bits = 1,
@@ -985,7 +985,7 @@ static int __init adav80x_init(void)
 {
 	int ret = 0;
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&adav80x_i2c_driver);
 	if (ret)
 		return ret;
@@ -1001,7 +1001,7 @@ module_init(adav80x_init);
 
 static void __exit adav80x_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&adav80x_i2c_driver);
 #endif
 #if defined(CONFIG_SPI_MASTER)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 04/11] adav80x: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (3 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 04/11] adav80x: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 05/11] ak4642: " Fabio Estevam
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/adav80x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 14a7c16..f7bf455 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -939,7 +939,7 @@ static struct spi_driver adav80x_spi_driver = {
 };
 #endif
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static const struct regmap_config adav80x_i2c_regmap_config = {
 	.val_bits = 8,
 	.pad_bits = 1,
@@ -985,7 +985,7 @@ static int __init adav80x_init(void)
 {
 	int ret = 0;
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&adav80x_i2c_driver);
 	if (ret)
 		return ret;
@@ -1001,7 +1001,7 @@ module_init(adav80x_init);
 
 static void __exit adav80x_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&adav80x_i2c_driver);
 #endif
 #if defined(CONFIG_SPI_MASTER)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 05/11] ak4642: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (4 preceding siblings ...)
  2013-11-20 17:37 ` Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 06/11] wm8728: " Fabio Estevam
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/ak4642.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 090d499..2f861c9 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -511,7 +511,7 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4648 = {
 	.num_dapm_routes	= ARRAY_SIZE(ak4642_intercon),
 };
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static struct of_device_id ak4642_of_match[];
 static int ak4642_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
@@ -576,7 +576,7 @@ static struct i2c_driver ak4642_i2c_driver = {
 static int __init ak4642_modinit(void)
 {
 	int ret = 0;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&ak4642_i2c_driver);
 #endif
 	return ret;
@@ -586,7 +586,7 @@ module_init(ak4642_modinit);
 
 static void __exit ak4642_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&ak4642_i2c_driver);
 #endif
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 06/11] wm8728: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (5 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 05/11] ak4642: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-21 13:09   ` Mark Brown
  2013-11-20 17:37 ` [PATCH 07/11] wm8711: " Fabio Estevam
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/wm8728.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index c6a292d..cd89033 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -320,7 +320,7 @@ static struct spi_driver wm8728_spi_driver = {
 };
 #endif /* CONFIG_SPI_MASTER */
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static int wm8728_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
 {
@@ -371,7 +371,7 @@ static struct i2c_driver wm8728_i2c_driver = {
 static int __init wm8728_modinit(void)
 {
 	int ret = 0;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&wm8728_i2c_driver);
 	if (ret != 0) {
 		printk(KERN_ERR "Failed to register wm8728 I2C driver: %d\n",
@@ -391,7 +391,7 @@ module_init(wm8728_modinit);
 
 static void __exit wm8728_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&wm8728_i2c_driver);
 #endif
 #if defined(CONFIG_SPI_MASTER)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 07/11] wm8711: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (6 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 06/11] wm8728: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 08/11] wm8580: " Fabio Estevam
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/wm8711.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index 5b428b0..d99f948 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -469,7 +469,7 @@ static struct spi_driver wm8711_spi_driver = {
 };
 #endif /* CONFIG_SPI_MASTER */
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static int wm8711_i2c_probe(struct i2c_client *client,
 			    const struct i2c_device_id *id)
 {
@@ -520,7 +520,7 @@ static struct i2c_driver wm8711_i2c_driver = {
 static int __init wm8711_modinit(void)
 {
 	int ret;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&wm8711_i2c_driver);
 	if (ret != 0) {
 		printk(KERN_ERR "Failed to register WM8711 I2C driver: %d\n",
@@ -540,7 +540,7 @@ module_init(wm8711_modinit);
 
 static void __exit wm8711_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&wm8711_i2c_driver);
 #endif
 #if defined(CONFIG_SPI_MASTER)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 08/11] wm8580: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (7 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 07/11] wm8711: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 09/11] wm8523: " Fabio Estevam
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/wm8580.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 08a414b..318989a 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -941,7 +941,7 @@ static const struct regmap_config wm8580_regmap = {
 	.volatile_reg = wm8580_volatile,
 };
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static int wm8580_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
 {
@@ -1003,7 +1003,7 @@ static int __init wm8580_modinit(void)
 {
 	int ret = 0;
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&wm8580_i2c_driver);
 	if (ret != 0) {
 		pr_err("Failed to register WM8580 I2C driver: %d\n", ret);
@@ -1016,7 +1016,7 @@ module_init(wm8580_modinit);
 
 static void __exit wm8580_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&wm8580_i2c_driver);
 #endif
 }
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 09/11] wm8523: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (8 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 08/11] wm8580: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 10/11] wm8510: " Fabio Estevam
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/wm8523.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index 139bf9a..74d106d 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -452,7 +452,7 @@ static const struct regmap_config wm8523_regmap = {
 	.volatile_reg = wm8523_volatile_register,
 };
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static int wm8523_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
 {
@@ -555,7 +555,7 @@ static struct i2c_driver wm8523_i2c_driver = {
 static int __init wm8523_modinit(void)
 {
 	int ret;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&wm8523_i2c_driver);
 	if (ret != 0) {
 		printk(KERN_ERR "Failed to register WM8523 I2C driver: %d\n",
@@ -568,7 +568,7 @@ module_init(wm8523_modinit);
 
 static void __exit wm8523_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&wm8523_i2c_driver);
 #endif
 }
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 10/11] wm8510: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (9 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 09/11] wm8523: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-20 17:37 ` [PATCH 11/11] uda1380: " Fabio Estevam
  2013-11-21 13:35 ` [PATCH 00/11] codecs: " Mark Brown
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/wm8510.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 6ed5433..7df7d45 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -684,7 +684,7 @@ static struct spi_driver wm8510_spi_driver = {
 };
 #endif /* CONFIG_SPI_MASTER */
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static int wm8510_i2c_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *id)
 {
@@ -735,7 +735,7 @@ static struct i2c_driver wm8510_i2c_driver = {
 static int __init wm8510_modinit(void)
 {
 	int ret = 0;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&wm8510_i2c_driver);
 	if (ret != 0) {
 		printk(KERN_ERR "Failed to register WM8510 I2C driver: %d\n",
@@ -755,7 +755,7 @@ module_init(wm8510_modinit);
 
 static void __exit wm8510_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&wm8510_i2c_driver);
 #endif
 #if defined(CONFIG_SPI_MASTER)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 11/11] uda1380: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (10 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 10/11] wm8510: " Fabio Estevam
@ 2013-11-20 17:37 ` Fabio Estevam
  2013-11-21 13:35 ` [PATCH 00/11] codecs: " Mark Brown
  12 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2013-11-20 17:37 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

From: Fabio Estevam <fabio.estevam@freescale.com>

Using the IS_ENABLED() macro can make the code shorter and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/uda1380.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index fd0a314..726df6d 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -794,7 +794,7 @@ static struct snd_soc_codec_driver soc_codec_dev_uda1380 = {
 	.num_dapm_routes = ARRAY_SIZE(uda1380_dapm_routes),
 };
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static int uda1380_i2c_probe(struct i2c_client *i2c,
 			     const struct i2c_device_id *id)
 {
@@ -840,7 +840,7 @@ static struct i2c_driver uda1380_i2c_driver = {
 static int __init uda1380_modinit(void)
 {
 	int ret = 0;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	ret = i2c_add_driver(&uda1380_i2c_driver);
 	if (ret != 0)
 		pr_err("Failed to register UDA1380 I2C driver: %d\n", ret);
@@ -851,7 +851,7 @@ module_init(uda1380_modinit);
 
 static void __exit uda1380_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	i2c_del_driver(&uda1380_i2c_driver);
 #endif
 }
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 06/11] wm8728: Use IS_ENABLED() macro
  2013-11-20 17:37 ` [PATCH 06/11] wm8728: " Fabio Estevam
@ 2013-11-21 13:09   ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2013-11-21 13:09 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 212 bytes --]

On Wed, Nov 20, 2013 at 03:37:47PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Using the IS_ENABLED() macro can make the code shorter and simpler.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/11] codecs: Use IS_ENABLED() macro
  2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
                   ` (11 preceding siblings ...)
  2013-11-20 17:37 ` [PATCH 11/11] uda1380: " Fabio Estevam
@ 2013-11-21 13:35 ` Mark Brown
  12 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2013-11-21 13:35 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 315 bytes --]

On Wed, Nov 20, 2013 at 03:37:40PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Using the IS_ENABLED() macro can make the code shorter and simpler.

Applied all, thanks, but please do remember to use appropriate subject
lines for commits - you were missing ASoC here.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 03/11] ad193x: Use IS_ENABLED() macro
  2013-11-20 17:37 ` [PATCH 03/11] ad193x: " Fabio Estevam
@ 2013-11-29  7:24   ` Scott Jiang
  0 siblings, 0 replies; 16+ messages in thread
From: Scott Jiang @ 2013-11-29  7:24 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel@alsa-project.org, Mark Brown

2013/11/21 Fabio Estevam <festevam@gmail.com>:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Using the IS_ENABLED() macro can make the code shorter and simpler.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  sound/soc/codecs/ad193x.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
> index aea7e52..12c27eb 100644
> --- a/sound/soc/codecs/ad193x.c
> +++ b/sound/soc/codecs/ad193x.c
> @@ -413,7 +413,7 @@ static struct spi_driver ad193x_spi_driver = {
>  };
>  #endif
>
> -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
> +#if IS_ENABLED(CONFIG_I2C)
>
>  static const struct regmap_config ad193x_i2c_regmap_config = {
>         .val_bits = 8,
> @@ -470,7 +470,7 @@ static int __init ad193x_modinit(void)
>  {
>         int ret;
>
> -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
> +#if IS_ENABLED(CONFIG_I2C)
>         ret =  i2c_add_driver(&ad193x_i2c_driver);
>         if (ret != 0) {
>                 printk(KERN_ERR "Failed to register AD193X I2C driver: %d\n",
> @@ -495,7 +495,7 @@ static void __exit ad193x_modexit(void)
>         spi_unregister_driver(&ad193x_spi_driver);
>  #endif
>
> -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
> +#if IS_ENABLED(CONFIG_I2C)
>         i2c_del_driver(&ad193x_i2c_driver);
>  #endif
>  }

Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-11-29  7:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 17:37 [PATCH 00/11] codecs: Use IS_ENABLED() macro Fabio Estevam
2013-11-20 17:37 ` [PATCH 01/11] wm8962: " Fabio Estevam
2013-11-20 17:37 ` [PATCH 02/11] soc-io.c: " Fabio Estevam
2013-11-20 17:37 ` [PATCH 03/11] ad193x: " Fabio Estevam
2013-11-29  7:24   ` Scott Jiang
2013-11-20 17:37 ` [PATCH 04/11] adav80x: " Fabio Estevam
2013-11-20 17:37 ` Fabio Estevam
2013-11-20 17:37 ` [PATCH 05/11] ak4642: " Fabio Estevam
2013-11-20 17:37 ` [PATCH 06/11] wm8728: " Fabio Estevam
2013-11-21 13:09   ` Mark Brown
2013-11-20 17:37 ` [PATCH 07/11] wm8711: " Fabio Estevam
2013-11-20 17:37 ` [PATCH 08/11] wm8580: " Fabio Estevam
2013-11-20 17:37 ` [PATCH 09/11] wm8523: " Fabio Estevam
2013-11-20 17:37 ` [PATCH 10/11] wm8510: " Fabio Estevam
2013-11-20 17:37 ` [PATCH 11/11] uda1380: " Fabio Estevam
2013-11-21 13:35 ` [PATCH 00/11] codecs: " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).