diff options
Diffstat (limited to 'sound/aoa/codecs')
-rw-r--r-- | sound/aoa/codecs/Makefile | 6 | ||||
-rw-r--r-- | sound/aoa/codecs/onyx.c | 11 | ||||
-rw-r--r-- | sound/aoa/codecs/onyx.h | 2 | ||||
-rw-r--r-- | sound/aoa/codecs/tas.c | 13 | ||||
-rw-r--r-- | sound/aoa/codecs/toonie.c | 2 |
5 files changed, 14 insertions, 20 deletions
diff --git a/sound/aoa/codecs/Makefile b/sound/aoa/codecs/Makefile index 95f4c3849d55..8feedc771bd9 100644 --- a/sound/aoa/codecs/Makefile +++ b/sound/aoa/codecs/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 -snd-aoa-codec-onyx-objs := onyx.o -snd-aoa-codec-tas-objs := tas.o -snd-aoa-codec-toonie-objs := toonie.o +snd-aoa-codec-onyx-y := onyx.o +snd-aoa-codec-tas-y := tas.o +snd-aoa-codec-toonie-y := toonie.o obj-$(CONFIG_SND_AOA_ONYX) += snd-aoa-codec-onyx.o obj-$(CONFIG_SND_AOA_TAS) += snd-aoa-codec-tas.o diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c index 12028b3e2eee..ac347a14f282 100644 --- a/sound/aoa/codecs/onyx.c +++ b/sound/aoa/codecs/onyx.c @@ -30,6 +30,7 @@ */ #include <linux/delay.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/slab.h> MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); MODULE_LICENSE("GPL"); @@ -990,8 +991,7 @@ static void onyx_exit_codec(struct aoa_codec *codec) onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); } -static int onyx_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int onyx_i2c_probe(struct i2c_client *client) { struct device_node *node = client->dev.of_node; struct onyx *onyx; @@ -1013,7 +1013,7 @@ static int onyx_i2c_probe(struct i2c_client *client, goto fail; } - strlcpy(onyx->codec.name, "onyx", MAX_CODEC_NAME_LEN); + strscpy(onyx->codec.name, "onyx", MAX_CODEC_NAME_LEN); onyx->codec.owner = THIS_MODULE; onyx->codec.init = onyx_init_codec; onyx->codec.exit = onyx_exit_codec; @@ -1029,7 +1029,7 @@ static int onyx_i2c_probe(struct i2c_client *client, return -ENODEV; } -static int onyx_i2c_remove(struct i2c_client *client) +static void onyx_i2c_remove(struct i2c_client *client) { struct onyx *onyx = i2c_get_clientdata(client); @@ -1037,11 +1037,10 @@ static int onyx_i2c_remove(struct i2c_client *client) of_node_put(onyx->codec.node); kfree(onyx->codec_info); kfree(onyx); - return 0; } static const struct i2c_device_id onyx_i2c_id[] = { - { "MAC,pcm3052", 0 }, + { "MAC,pcm3052" }, { } }; MODULE_DEVICE_TABLE(i2c,onyx_i2c_id); diff --git a/sound/aoa/codecs/onyx.h b/sound/aoa/codecs/onyx.h index 8a32c3c3d716..bbdca841fe90 100644 --- a/sound/aoa/codecs/onyx.h +++ b/sound/aoa/codecs/onyx.h @@ -6,10 +6,8 @@ */ #ifndef __SND_AOA_CODEC_ONYX_H #define __SND_AOA_CODEC_ONYX_H -#include <stddef.h> #include <linux/i2c.h> #include <asm/pmac_low_i2c.h> -#include <asm/prom.h> /* PCM3052 register definitions */ diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c index d3e37577b529..804b2ebbe28f 100644 --- a/sound/aoa/codecs/tas.c +++ b/sound/aoa/codecs/tas.c @@ -58,13 +58,12 @@ * and up to the hardware designer to not wire * them up in some weird unusable way. */ -#include <stddef.h> #include <linux/i2c.h> #include <asm/pmac_low_i2c.h> -#include <asm/prom.h> #include <linux/delay.h> #include <linux/module.h> #include <linux/mutex.h> +#include <linux/of.h> #include <linux/slab.h> MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); @@ -876,8 +875,7 @@ static void tas_exit_codec(struct aoa_codec *codec) } -static int tas_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int tas_i2c_probe(struct i2c_client *client) { struct device_node *node = client->dev.of_node; struct tas *tas; @@ -894,7 +892,7 @@ static int tas_i2c_probe(struct i2c_client *client, /* seems that half is a saner default */ tas->drc_range = TAS3004_DRC_MAX / 2; - strlcpy(tas->codec.name, "tas", MAX_CODEC_NAME_LEN); + strscpy(tas->codec.name, "tas", MAX_CODEC_NAME_LEN); tas->codec.owner = THIS_MODULE; tas->codec.init = tas_init_codec; tas->codec.exit = tas_exit_codec; @@ -913,7 +911,7 @@ static int tas_i2c_probe(struct i2c_client *client, return -EINVAL; } -static int tas_i2c_remove(struct i2c_client *client) +static void tas_i2c_remove(struct i2c_client *client) { struct tas *tas = i2c_get_clientdata(client); u8 tmp = TAS_ACR_ANALOG_PDOWN; @@ -926,11 +924,10 @@ static int tas_i2c_remove(struct i2c_client *client) mutex_destroy(&tas->mtx); kfree(tas); - return 0; } static const struct i2c_device_id tas_i2c_id[] = { - { "MAC,tas3004", 0 }, + { "MAC,tas3004" }, { } }; MODULE_DEVICE_TABLE(i2c,tas_i2c_id); diff --git a/sound/aoa/codecs/toonie.c b/sound/aoa/codecs/toonie.c index c2d014486c33..0da5af129492 100644 --- a/sound/aoa/codecs/toonie.c +++ b/sound/aoa/codecs/toonie.c @@ -126,7 +126,7 @@ static int __init toonie_init(void) if (!toonie) return -ENOMEM; - strlcpy(toonie->codec.name, "toonie", sizeof(toonie->codec.name)); + strscpy(toonie->codec.name, "toonie", sizeof(toonie->codec.name)); toonie->codec.owner = THIS_MODULE; toonie->codec.init = toonie_init_codec; toonie->codec.exit = toonie_exit_codec; |