提交 59f25070 编写于 作者: M Mark Brown 提交者: Samuel Ortiz

mfd: Update WM8350 drivers for changed interrupt numbers

The headphone detect and charger are using the IRQ numbers so need
to take account of irq_base with the genirq conversion. I obviously
picked the wrong system for initial testing.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 ecf926bc
...@@ -190,7 +190,7 @@ static irqreturn_t wm8350_charger_handler(int irq, void *data) ...@@ -190,7 +190,7 @@ static irqreturn_t wm8350_charger_handler(int irq, void *data)
struct wm8350_power *power = &wm8350->power; struct wm8350_power *power = &wm8350->power;
struct wm8350_charger_policy *policy = power->policy; struct wm8350_charger_policy *policy = power->policy;
switch (irq) { switch (irq - wm8350->irq_base) {
case WM8350_IRQ_CHG_BAT_FAIL: case WM8350_IRQ_CHG_BAT_FAIL:
dev_err(wm8350->dev, "battery failed\n"); dev_err(wm8350->dev, "battery failed\n");
break; break;
......
...@@ -1349,7 +1349,7 @@ static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) ...@@ -1349,7 +1349,7 @@ static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
int mask; int mask;
struct wm8350_jack_data *jack = NULL; struct wm8350_jack_data *jack = NULL;
switch (irq) { switch (irq - wm8350->irq_base) {
case WM8350_IRQ_CODEC_JCK_DET_L: case WM8350_IRQ_CODEC_JCK_DET_L:
jack = &priv->hpl; jack = &priv->hpl;
mask = WM8350_JACK_L_LVL; mask = WM8350_JACK_L_LVL;
...@@ -1424,7 +1424,7 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which, ...@@ -1424,7 +1424,7 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which,
wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena); wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena);
/* Sync status */ /* Sync status */
wm8350_hp_jack_handler(irq, priv); wm8350_hp_jack_handler(irq + wm8350->irq_base, priv);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册