Skip to content

Commit 98654d3

Browse files
AxelLintiwai
authored andcommitted
ALSA: aoa: Convert onyx and tas codec drivers to module_i2c_driver
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>
1 parent 8a3e537 commit 98654d3

2 files changed

Lines changed: 2 additions & 24 deletions

File tree

‎sound/aoa/codecs/onyx.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,15 +1132,4 @@ static struct i2c_driver onyx_driver = {
11321132
.id_table = onyx_i2c_id,
11331133
};
11341134

1135-
static int __init onyx_init(void)
1136-
{
1137-
return i2c_add_driver(&onyx_driver);
1138-
}
1139-
1140-
static void __exit onyx_exit(void)
1141-
{
1142-
i2c_del_driver(&onyx_driver);
1143-
}
1144-
1145-
module_init(onyx_init);
1146-
module_exit(onyx_exit);
1135+
module_i2c_driver(onyx_driver);

‎sound/aoa/codecs/tas.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,15 +1026,4 @@ static struct i2c_driver tas_driver = {
10261026
.id_table = tas_i2c_id,
10271027
};
10281028

1029-
static int __init tas_init(void)
1030-
{
1031-
return i2c_add_driver(&tas_driver);
1032-
}
1033-
1034-
static void __exit tas_exit(void)
1035-
{
1036-
i2c_del_driver(&tas_driver);
1037-
}
1038-
1039-
module_init(tas_init);
1040-
module_exit(tas_exit);
1029+
module_i2c_driver(tas_driver);

0 commit comments

Comments
 (0)