diff options
Diffstat (limited to 'sound/soc/codecs/wm8350.c')
-rw-r--r-- | sound/soc/codecs/wm8350.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 54971fcb7e4e..f610518a8887 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -60,7 +60,7 @@ struct wm8350_jack_data { | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct wm8350_data { | 62 | struct wm8350_data { |
63 | struct snd_soc_codec codec; | 63 | struct wm8350 *wm8350; |
64 | struct wm8350_output out1; | 64 | struct wm8350_output out1; |
65 | struct wm8350_output out2; | 65 | struct wm8350_output out2; |
66 | struct wm8350_jack_data hpl; | 66 | struct wm8350_jack_data hpl; |
@@ -1270,7 +1270,7 @@ static void wm8350_hp_work(struct wm8350_data *priv, | |||
1270 | struct wm8350_jack_data *jack, | 1270 | struct wm8350_jack_data *jack, |
1271 | u16 mask) | 1271 | u16 mask) |
1272 | { | 1272 | { |
1273 | struct wm8350 *wm8350 = priv->codec.control_data; | 1273 | struct wm8350 *wm8350 = priv->wm8350; |
1274 | u16 reg; | 1274 | u16 reg; |
1275 | int report; | 1275 | int report; |
1276 | 1276 | ||
@@ -1303,7 +1303,7 @@ static void wm8350_hpr_work(struct work_struct *work) | |||
1303 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) | 1303 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) |
1304 | { | 1304 | { |
1305 | struct wm8350_data *priv = data; | 1305 | struct wm8350_data *priv = data; |
1306 | struct wm8350 *wm8350 = priv->codec.control_data; | 1306 | struct wm8350 *wm8350 = priv->wm8350; |
1307 | struct wm8350_jack_data *jack = NULL; | 1307 | struct wm8350_jack_data *jack = NULL; |
1308 | 1308 | ||
1309 | switch (irq - wm8350->irq_base) { | 1309 | switch (irq - wm8350->irq_base) { |
@@ -1388,7 +1388,7 @@ EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect); | |||
1388 | static irqreturn_t wm8350_mic_handler(int irq, void *data) | 1388 | static irqreturn_t wm8350_mic_handler(int irq, void *data) |
1389 | { | 1389 | { |
1390 | struct wm8350_data *priv = data; | 1390 | struct wm8350_data *priv = data; |
1391 | struct wm8350 *wm8350 = priv->codec.control_data; | 1391 | struct wm8350 *wm8350 = priv->wm8350; |
1392 | u16 reg; | 1392 | u16 reg; |
1393 | int report = 0; | 1393 | int report = 0; |
1394 | 1394 | ||
@@ -1496,6 +1496,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) | |||
1496 | return -ENOMEM; | 1496 | return -ENOMEM; |
1497 | snd_soc_codec_set_drvdata(codec, priv); | 1497 | snd_soc_codec_set_drvdata(codec, priv); |
1498 | 1498 | ||
1499 | priv->wm8350 = wm8350; | ||
1500 | |||
1499 | for (i = 0; i < ARRAY_SIZE(supply_names); i++) | 1501 | for (i = 0; i < ARRAY_SIZE(supply_names); i++) |
1500 | priv->supplies[i].supply = supply_names[i]; | 1502 | priv->supplies[i].supply = supply_names[i]; |
1501 | 1503 | ||
@@ -1504,7 +1506,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) | |||
1504 | if (ret != 0) | 1506 | if (ret != 0) |
1505 | return ret; | 1507 | return ret; |
1506 | 1508 | ||
1507 | wm8350->codec.codec = codec; | ||
1508 | codec->control_data = wm8350; | 1509 | codec->control_data = wm8350; |
1509 | 1510 | ||
1510 | /* Put the codec into reset if it wasn't already */ | 1511 | /* Put the codec into reset if it wasn't already */ |