]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ALSA: aoa: Convert onyx and tas codec drivers to module_i2c_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 27 Jan 2012 07:23:51 +0000 (15:23 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 27 Jan 2012 14:18:28 +0000 (15:18 +0100)
This patch converts onyx and tas codec drivers to use the module_i2c_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/aoa/codecs/onyx.c
sound/aoa/codecs/tas.c

index 762af68c8996fbb83a822638f76f2c29a7d63f9a..270790d384e20f06a38f369cf5aa9c980aac4ed6 100644 (file)
@@ -1132,15 +1132,4 @@ static struct i2c_driver onyx_driver = {
        .id_table = onyx_i2c_id,
 };
 
-static int __init onyx_init(void)
-{
-       return i2c_add_driver(&onyx_driver);
-}
-
-static void __exit onyx_exit(void)
-{
-       i2c_del_driver(&onyx_driver);
-}
-
-module_init(onyx_init);
-module_exit(onyx_exit);
+module_i2c_driver(onyx_driver);
index fd2188c3df2b4c436c9a6112cbc577c309d2898e..8e63d1f35ce1228cc1f6abb76cb39e1d421ea43a 100644 (file)
@@ -1026,15 +1026,4 @@ static struct i2c_driver tas_driver = {
        .id_table = tas_i2c_id,
 };
 
-static int __init tas_init(void)
-{
-       return i2c_add_driver(&tas_driver);
-}
-
-static void __exit tas_exit(void)
-{
-       i2c_del_driver(&tas_driver);
-}
-
-module_init(tas_init);
-module_exit(tas_exit);
+module_i2c_driver(tas_driver);