Skip to content

Commit 9ea6fbc

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: wm8750: 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 9ea6fbc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/soc/codecs/wm8750.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ static struct spi_driver wm8750_spi_driver = {
816816
};
817817
#endif /* CONFIG_SPI_MASTER */
818818

819-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
819+
#if IS_ENABLED(CONFIG_I2C)
820820
static int wm8750_i2c_probe(struct i2c_client *i2c,
821821
const struct i2c_device_id *id)
822822
{
@@ -868,7 +868,7 @@ static struct i2c_driver wm8750_i2c_driver = {
868868
static int __init wm8750_modinit(void)
869869
{
870870
int ret = 0;
871-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
871+
#if IS_ENABLED(CONFIG_I2C)
872872
ret = i2c_add_driver(&wm8750_i2c_driver);
873873
if (ret != 0) {
874874
printk(KERN_ERR "Failed to register wm8750 I2C driver: %d\n",
@@ -888,7 +888,7 @@ module_init(wm8750_modinit);
888888

889889
static void __exit wm8750_exit(void)
890890
{
891-
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
891+
#if IS_ENABLED(CONFIG_I2C)
892892
i2c_del_driver(&wm8750_i2c_driver);
893893
#endif
894894
#if defined(CONFIG_SPI_MASTER)

0 commit comments

Comments
 (0)