From 1e4c0d7c9a2b44e18fe9e93712672741f70e36da Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Mon, 7 Jul 2014 13:16:54 +0100 Subject: [PATCH 1/3] ASoC: add SOC_VALUE_ENUM_EXT Adds an equivalent of SOC_ENUM_EXT for value enums Strictly speaking SOC_ENUM_EXT can also be used to define a value enum since the only difference is the get and set functions. But this doesn't look good in code because it is inconsistent with the normal control definitions. Adding a specific SOC_VALUE_ENUM_EXT is better for code clarity. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown --- include/sound/soc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sound/soc.h b/include/sound/soc.h index ed9e2d7e5fdc..5d812cfe9427 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -248,6 +248,8 @@ .info = snd_soc_info_enum_double, \ .get = xhandler_get, .put = xhandler_put, \ .private_value = (unsigned long)&xenum } +#define SOC_VALUE_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) \ + SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) #define SND_SOC_BYTES(xname, xbase, xregs) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ From 7e07e7c0854b32181b314f5ba43007629594663a Mon Sep 17 00:00:00 2001 From: Tushar Behera Date: Fri, 4 Jul 2014 14:23:00 +0530 Subject: [PATCH 2/3] ASoC: core: Fix possible NULL pointer dereference snd_soc_of_parse_card_name() may be called before card->dev has been set, which results in a kernel panic. Unable to handle kernel NULL pointer dereference at virtual address 00000210 PC is at snd_soc_of_parse_card_name+0x18/0x54 LR is at snow_probe+0x5c/0xd4 Add an error check in snd_soc_of_parse_card_name() to take care of this case and print out a message in case of error. Signed-off-by: Tushar Behera Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b87d7d882e6d..63d11071fdba 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4420,9 +4420,16 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_codec); int snd_soc_of_parse_card_name(struct snd_soc_card *card, const char *propname) { - struct device_node *np = card->dev->of_node; + struct device_node *np; int ret; + if (!card->dev) { + pr_err("card->dev is not set before calling %s\n", __func__); + return -EINVAL; + } + + np = card->dev->of_node; + ret = of_property_read_string_index(np, propname, 0, &card->name); /* * EINVAL means the property does not exist. This is fine providing From 0e400c53812e11442785019de7df02e6adc71311 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 31 Jul 2014 12:38:31 +0100 Subject: [PATCH 3/3] MAINTAINERS: Add entry for Realtek CODECs Help ensure that patches get sent to the Realtek developers for review by adding an explicit MAINTAINERS entry for them. Signed-off-by: Mark Brown Acked-by: Bard Liao --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 134483f206e4..a5f9b3a4c852 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7448,6 +7448,13 @@ F: drivers/rtc/ F: include/linux/rtc.h F: include/uapi/linux/rtc.h +REALTEK AUDIO CODECS +M: Bard Liao +M: Oder Chiou +S: Maintained +F: sound/soc/codecs/rt* +F: include/sound/rt*.h + REISERFS FILE SYSTEM L: reiserfs-devel@vger.kernel.org S: Supported