Skip to content

Commit 5c15371

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: wm8728: 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 5c15371

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/wm8728.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ static struct spi_driver wm8728_spi_driver = {
320320
};
321321
#endif /* CONFIG_SPI_MASTER */
322322

323-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
323+
#if IS_ENABLED(CONFIG_I2C)
324324
static int wm8728_i2c_probe(struct i2c_client *i2c,
325325
const struct i2c_device_id *id)
326326
{
@@ -371,7 +371,7 @@ static struct i2c_driver wm8728_i2c_driver = {
371371
static int __init wm8728_modinit(void)
372372
{
373373
int ret = 0;
374-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
374+
#if IS_ENABLED(CONFIG_I2C)
375375
ret = i2c_add_driver(&wm8728_i2c_driver);
376376
if (ret != 0) {
377377
printk(KERN_ERR "Failed to register wm8728 I2C driver: %d\n",
@@ -391,7 +391,7 @@ module_init(wm8728_modinit);
391391

392392
static void __exit wm8728_exit(void)
393393
{
394-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
394+
#if IS_ENABLED(CONFIG_I2C)
395395
i2c_del_driver(&wm8728_i2c_driver);
396396
#endif
397397
#if defined(CONFIG_SPI_MASTER)

0 commit comments

Comments
 (0)