Skip to content

Commit f58c4fc

Browse files
Fabio Estevambroonie
authored andcommitted
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>
1 parent 6ce4eac commit f58c4fc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/wm8580.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ static const struct regmap_config wm8580_regmap = {
941941
.volatile_reg = wm8580_volatile,
942942
};
943943

944-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
944+
#if IS_ENABLED(CONFIG_I2C)
945945
static int wm8580_i2c_probe(struct i2c_client *i2c,
946946
const struct i2c_device_id *id)
947947
{
@@ -1003,7 +1003,7 @@ static int __init wm8580_modinit(void)
10031003
{
10041004
int ret = 0;
10051005

1006-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
1006+
#if IS_ENABLED(CONFIG_I2C)
10071007
ret = i2c_add_driver(&wm8580_i2c_driver);
10081008
if (ret != 0) {
10091009
pr_err("Failed to register WM8580 I2C driver: %d\n", ret);
@@ -1016,7 +1016,7 @@ module_init(wm8580_modinit);
10161016

10171017
static void __exit wm8580_exit(void)
10181018
{
1019-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
1019+
#if IS_ENABLED(CONFIG_I2C)
10201020
i2c_del_driver(&wm8580_i2c_driver);
10211021
#endif
10221022
}

0 commit comments

Comments
 (0)