aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4535.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-17 01:52:44 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-17 02:04:43 -0500
commitb08c576434211f2e908f37844dc61ec6e0e1ecec (patch)
treea150f0a397b9ec5a82d1d14e7f9fd88839423ad5 /sound/soc/codecs/ak4535.c
parentd69280be4160963796f3a899722c126ab4889f02 (diff)
ASoC: ak4535: Make I2C usage unconditional
Convert to module_i2c_driver() too. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ak4535.c')
-rw-r--r--sound/soc/codecs/ak4535.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 29d4dec1c25d..71fca53c9bbf 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -409,7 +409,6 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4535 = {
409 .num_dapm_routes = ARRAY_SIZE(ak4535_audio_map), 409 .num_dapm_routes = ARRAY_SIZE(ak4535_audio_map),
410}; 410};
411 411
412#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
413static __devinit int ak4535_i2c_probe(struct i2c_client *i2c, 412static __devinit int ak4535_i2c_probe(struct i2c_client *i2c,
414 const struct i2c_device_id *id) 413 const struct i2c_device_id *id)
415{ 414{
@@ -450,29 +449,8 @@ static struct i2c_driver ak4535_i2c_driver = {
450 .remove = __devexit_p(ak4535_i2c_remove), 449 .remove = __devexit_p(ak4535_i2c_remove),
451 .id_table = ak4535_i2c_id, 450 .id_table = ak4535_i2c_id,
452}; 451};
453#endif
454 452
455static int __init ak4535_modinit(void) 453module_i2c_driver(ak4535_i2c_driver);
456{
457 int ret = 0;
458#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
459 ret = i2c_add_driver(&ak4535_i2c_driver);
460 if (ret != 0) {
461 printk(KERN_ERR "Failed to register AK4535 I2C driver: %d\n",
462 ret);
463 }
464#endif
465 return ret;
466}
467module_init(ak4535_modinit);
468
469static void __exit ak4535_exit(void)
470{
471#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
472 i2c_del_driver(&ak4535_i2c_driver);
473#endif
474}
475module_exit(ak4535_exit);
476 454
477MODULE_DESCRIPTION("Soc AK4535 driver"); 455MODULE_DESCRIPTION("Soc AK4535 driver");
478MODULE_AUTHOR("Richard Purdie"); 456MODULE_AUTHOR("Richard Purdie");