aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2016-11-16 20:13:18 -0500
committerMark Brown <broonie@kernel.org>2016-11-22 11:27:59 -0500
commit60bc6173e049ef0f2dd5e7341659afada62f6b1d (patch)
treefdbfe1abfa7f9022b87ba54298019d289498c3e2
parent2f3d1b659344ad28bd559dcb2176e9ae84a2b044 (diff)
ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm8580.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index da93b703ed49..910801dddd64 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -1000,7 +1000,6 @@ static const struct of_device_id wm8580_of_match[] = {
1000}; 1000};
1001MODULE_DEVICE_TABLE(of, wm8580_of_match); 1001MODULE_DEVICE_TABLE(of, wm8580_of_match);
1002 1002
1003#if IS_ENABLED(CONFIG_I2C)
1004static int wm8580_i2c_probe(struct i2c_client *i2c, 1003static int wm8580_i2c_probe(struct i2c_client *i2c,
1005 const struct i2c_device_id *id) 1004 const struct i2c_device_id *id)
1006{ 1005{
@@ -1066,30 +1065,8 @@ static struct i2c_driver wm8580_i2c_driver = {
1066 .remove = wm8580_i2c_remove, 1065 .remove = wm8580_i2c_remove,
1067 .id_table = wm8580_i2c_id, 1066 .id_table = wm8580_i2c_id,
1068}; 1067};
1069#endif
1070 1068
1071static int __init wm8580_modinit(void) 1069module_i2c_driver(wm8580_i2c_driver);
1072{
1073 int ret = 0;
1074
1075#if IS_ENABLED(CONFIG_I2C)
1076 ret = i2c_add_driver(&wm8580_i2c_driver);
1077 if (ret != 0) {
1078 pr_err("Failed to register WM8580 I2C driver: %d\n", ret);
1079 }
1080#endif
1081
1082 return ret;
1083}
1084module_init(wm8580_modinit);
1085
1086static void __exit wm8580_exit(void)
1087{
1088#if IS_ENABLED(CONFIG_I2C)
1089 i2c_del_driver(&wm8580_i2c_driver);
1090#endif
1091}
1092module_exit(wm8580_exit);
1093 1070
1094MODULE_DESCRIPTION("ASoC WM8580 driver"); 1071MODULE_DESCRIPTION("ASoC WM8580 driver");
1095MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); 1072MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");