summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8350.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-04 16:10:51 +0000
committerSamuel Ortiz <sameo@linux.intel.com>2009-12-13 19:21:39 +0100
commit5a65edbc12b6b34ef912114f1fc8215786f85b25 (patch)
treeffe43bd1234b52ad1c3774b096a51594aabe49ad /sound/soc/codecs/wm8350.c
parentb9f96b5dcb1e2a75d142e481b77805ffdc6ccea6 (diff)
downloadop-kernel-dev-5a65edbc12b6b34ef912114f1fc8215786f85b25.zip
op-kernel-dev-5a65edbc12b6b34ef912114f1fc8215786f85b25.tar.gz
mfd: Convert wm8350 IRQ handlers to irq_handler_t
This is done as simple code transformation, the semantics of the IRQ API provided by the core are are still very different to those of genirq (mainly with regard to masking). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'sound/soc/codecs/wm8350.c')
-rw-r--r--sound/soc/codecs/wm8350.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index f82125d..17a327d 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -1340,9 +1340,10 @@ static int wm8350_resume(struct platform_device *pdev)
return 0;
}
-static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data)
+static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
{
struct wm8350_data *priv = data;
+ struct wm8350 *wm8350 = priv->codec.control_data;
u16 reg;
int report;
int mask;
@@ -1365,7 +1366,7 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data)
if (!jack->jack) {
dev_warn(wm8350->dev, "Jack interrupt called with no jack\n");
- return;
+ return IRQ_NONE;
}
/* Debounce */
@@ -1378,6 +1379,8 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data)
report = 0;
snd_soc_jack_report(jack->jack, report, jack->report);
+
+ return IRQ_HANDLED;
}
/**
@@ -1421,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(wm8350, irq, priv);
+ wm8350_hp_jack_handler(irq, priv);
wm8350_unmask_irq(wm8350, irq);
@@ -1485,9 +1488,11 @@ static int wm8350_probe(struct platform_device *pdev)
wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L);
wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R);
wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L,
- wm8350_hp_jack_handler, priv);
+ wm8350_hp_jack_handler, 0, "Left jack detect",
+ priv);
wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R,
- wm8350_hp_jack_handler, priv);
+ wm8350_hp_jack_handler, 0, "Right jack detect",
+ priv);
ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
if (ret < 0) {
OpenPOWER on IntegriCloud