From 40285f832b09feb621d8da9db7983200a4b29311 Mon Sep 17 00:00:00 2001 From: Matti Aaltonen Date: Tue, 1 Mar 2011 10:10:37 -0300 Subject: [media] ASoC: WL1273 FM radio: Access I2C IO functions through pointers These changes are needed to keep up with the changes in the MFD core and V4L2 parts of the wl1273 FM radio driver. Use function pointers instead of exported functions for I2C IO. Also move all preprocessor constants from the wl1273.h to include/linux/mfd/wl1273-core.h. Also update the year in the copyright statement. Signed-off-by: Matti J. Aaltonen Acked-by: Mark Brown Signed-off-by: Mauro Carvalho Chehab --- sound/soc/codecs/wl1273.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sound/soc/codecs/wl1273.c') diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index 861b28f543d2..5836201834d9 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -3,7 +3,7 @@ * * Author: Matti Aaltonen, * - * Copyright: (C) 2010 Nokia Corporation + * Copyright: (C) 2010, 2011 Nokia Corporation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -179,7 +179,12 @@ static int snd_wl1273_get_audio_route(struct snd_kcontrol *kcontrol, return 0; } -static const char *wl1273_audio_route[] = { "Bt", "FmRx", "FmTx" }; +/* + * TODO: Implement the audio routing in the driver. Now this control + * only indicates the setting that has been done elsewhere (in the user + * space). + */ +static const char * const wl1273_audio_route[] = { "Bt", "FmRx", "FmTx" }; static int snd_wl1273_set_audio_route(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) @@ -239,7 +244,7 @@ static int snd_wl1273_fm_audio_put(struct snd_kcontrol *kcontrol, return 1; } -static const char *wl1273_audio_strings[] = { "Digital", "Analog" }; +static const char * const wl1273_audio_strings[] = { "Digital", "Analog" }; static const struct soc_enum wl1273_audio_enum = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(wl1273_audio_strings), -- cgit v1.2.3 From 15de7a41d30cfe8090efdc5fd6a92ed7a2d80ce7 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Thu, 17 Feb 2011 19:07:17 -0800 Subject: mfd: mfd_cell is now implicitly available to wl1273 drivers The cell's platform_data is now accessed with a helper function; change clients to use that, and remove the now-unused data_size. Signed-off-by: Andres Salomon Signed-off-by: Samuel Ortiz --- sound/soc/codecs/wl1273.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/soc/codecs/wl1273.c') diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index 861b28f543d2..1ad0d5aecece 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -436,7 +436,8 @@ EXPORT_SYMBOL_GPL(wl1273_get_format); static int wl1273_probe(struct snd_soc_codec *codec) { - struct wl1273_core **core = codec->dev->platform_data; + struct wl1273_core **core = + mfd_get_data(to_platform_device(codec->dev)); struct wl1273_priv *wl1273; int r; -- cgit v1.2.3