Skip to content

Commit

Permalink
mfd: Update WM8350 drivers for changed interrupt numbers
Browse files Browse the repository at this point in the history
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Mar 7, 2010
1 parent ecf926b commit 59f2507
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/power/wm8350_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static irqreturn_t wm8350_charger_handler(int irq, void *data)
struct wm8350_power *power = &wm8350->power;
struct wm8350_charger_policy *policy = power->policy;

switch (irq) {
switch (irq - wm8350->irq_base) {
case WM8350_IRQ_CHG_BAT_FAIL:
dev_err(wm8350->dev, "battery failed\n");
break;
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8350.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
int mask;
struct wm8350_jack_data *jack = NULL;

switch (irq) {
switch (irq - wm8350->irq_base) {
case WM8350_IRQ_CODEC_JCK_DET_L:
jack = &priv->hpl;
mask = WM8350_JACK_L_LVL;
Expand Down Expand Up @@ -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);

/* Sync status */
wm8350_hp_jack_handler(irq, priv);
wm8350_hp_jack_handler(irq + wm8350->irq_base, priv);

return 0;
}
Expand Down

0 comments on commit 59f2507

Please sign in to comment.