ASoC: alc5632: Convert to module_i2c_driver()
[deliverable/linux.git] / sound / soc / codecs / alc5632.c
index e2111e0ccad7eedad086e5bc791d690f86388a15..b29a53be75a74c7587f47900f40a734d12ed5043 100644 (file)
@@ -861,8 +861,7 @@ static int alc5632_set_dai_fmt(struct snd_soc_dai *codec_dai,
 static int alc5632_pcm_hw_params(struct snd_pcm_substream *substream,
                struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_codec *codec = rtd->codec;
+       struct snd_soc_codec *codec = dai->codec;
        int coeff, rate;
        u16 iface;
 
@@ -1209,25 +1208,7 @@ static struct i2c_driver alc5632_i2c_driver = {
        .id_table = alc5632_i2c_table,
 };
 
-static int __init alc5632_modinit(void)
-{
-       int ret;
-
-       ret = i2c_add_driver(&alc5632_i2c_driver);
-       if (ret != 0) {
-               printk(KERN_ERR "%s: can't add i2c driver", __func__);
-               return ret;
-       }
-
-       return ret;
-}
-module_init(alc5632_modinit);
-
-static void __exit alc5632_modexit(void)
-{
-       i2c_del_driver(&alc5632_i2c_driver);
-}
-module_exit(alc5632_modexit);
+module_i2c_driver(alc5632_i2c_driver);
 
 MODULE_DESCRIPTION("ASoC ALC5632 driver");
 MODULE_AUTHOR("Leon Romanovsky <leon@leon.nu>");
This page took 0.027663 seconds and 5 git commands to generate.