]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rt5682: Fix build error without CONFIG_I2C
authorYueHaibing <yuehaibing@huawei.com>
Wed, 1 Apr 2020 09:10:55 +0000 (17:10 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 1 Apr 2020 11:06:28 +0000 (12:06 +0100)
commit87a0cb113732cc883e543bba924833841edbe385
tree0a8924dc11cefb099844e67401d5577ac4b77571
parentb51219330f6d7f067e0bb5edfe85a3a3f75ca9eb
ASoC: rt5682: Fix build error without CONFIG_I2C

If I2C is n but SoundWire is m, building fails:

sound/soc/codecs/rt5682.c:3716:1: warning: data definition has no type or storage class
 module_i2c_driver(rt5682_i2c_driver);
 ^~~~~~~~~~~~~~~~~
sound/soc/codecs/rt5682.c:3716:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
sound/soc/codecs/rt5682.c:3716:1: warning: parameter names (without types) in function declaration

Guard this use #ifdef CONFIG_I2C.

Fixes: 19922600cd51 ("ASoC: rt5682: fix unmet dependencies")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20200401091055.34112-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5682.c