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 8c4c9591ec05..aa12c6b6beeb 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; |
@@ -1309,7 +1309,7 @@ static void wm8350_hp_work(struct wm8350_data *priv, | |||
1309 | struct wm8350_jack_data *jack, | 1309 | struct wm8350_jack_data *jack, |
1310 | u16 mask) | 1310 | u16 mask) |
1311 | { | 1311 | { |
1312 | struct wm8350 *wm8350 = priv->codec.control_data; | 1312 | struct wm8350 *wm8350 = priv->wm8350; |
1313 | u16 reg; | 1313 | u16 reg; |
1314 | int report; | 1314 | int report; |
1315 | 1315 | ||
@@ -1342,7 +1342,7 @@ static void wm8350_hpr_work(struct work_struct *work) | |||
1342 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) | 1342 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) |
1343 | { | 1343 | { |
1344 | struct wm8350_data *priv = data; | 1344 | struct wm8350_data *priv = data; |
1345 | struct wm8350 *wm8350 = priv->codec.control_data; | 1345 | struct wm8350 *wm8350 = priv->wm8350; |
1346 | struct wm8350_jack_data *jack = NULL; | 1346 | struct wm8350_jack_data *jack = NULL; |
1347 | 1347 | ||
1348 | switch (irq - wm8350->irq_base) { | 1348 | switch (irq - wm8350->irq_base) { |
@@ -1427,7 +1427,7 @@ EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect); | |||
1427 | static irqreturn_t wm8350_mic_handler(int irq, void *data) | 1427 | static irqreturn_t wm8350_mic_handler(int irq, void *data) |
1428 | { | 1428 | { |
1429 | struct wm8350_data *priv = data; | 1429 | struct wm8350_data *priv = data; |
1430 | struct wm8350 *wm8350 = priv->codec.control_data; | 1430 | struct wm8350 *wm8350 = priv->wm8350; |
1431 | u16 reg; | 1431 | u16 reg; |
1432 | int report = 0; | 1432 | int report = 0; |
1433 | 1433 | ||
@@ -1536,6 +1536,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) | |||
1536 | return -ENOMEM; | 1536 | return -ENOMEM; |
1537 | snd_soc_codec_set_drvdata(codec, priv); | 1537 | snd_soc_codec_set_drvdata(codec, priv); |
1538 | 1538 | ||
1539 | priv->wm8350 = wm8350; | ||
1540 | |||
1539 | for (i = 0; i < ARRAY_SIZE(supply_names); i++) | 1541 | for (i = 0; i < ARRAY_SIZE(supply_names); i++) |
1540 | priv->supplies[i].supply = supply_names[i]; | 1542 | priv->supplies[i].supply = supply_names[i]; |
1541 | 1543 | ||
@@ -1544,7 +1546,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) | |||
1544 | if (ret != 0) | 1546 | if (ret != 0) |
1545 | return ret; | 1547 | return ret; |
1546 | 1548 | ||
1547 | wm8350->codec.codec = codec; | ||
1548 | codec->control_data = wm8350; | 1549 | codec->control_data = wm8350; |
1549 | 1550 | ||
1550 | /* Put the codec into reset if it wasn't already */ | 1551 | /* Put the codec into reset if it wasn't already */ |