diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-04 11:10:51 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2009-12-13 13:21:39 -0500 |
commit | 5a65edbc12b6b34ef912114f1fc8215786f85b25 (patch) | |
tree | ffe43bd1234b52ad1c3774b096a51594aabe49ad /sound | |
parent | b9f96b5dcb1e2a75d142e481b77805ffdc6ccea6 (diff) |
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')
-rw-r--r-- | sound/soc/codecs/wm8350.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index f82125d9e85a..17a327d67fd5 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) | |||
1340 | return 0; | 1340 | return 0; |
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data) | 1343 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) |
1344 | { | 1344 | { |
1345 | struct wm8350_data *priv = data; | 1345 | struct wm8350_data *priv = data; |
1346 | struct wm8350 *wm8350 = priv->codec.control_data; | ||
1346 | u16 reg; | 1347 | u16 reg; |
1347 | int report; | 1348 | int report; |
1348 | int mask; | 1349 | int mask; |
@@ -1365,7 +1366,7 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data) | |||
1365 | 1366 | ||
1366 | if (!jack->jack) { | 1367 | if (!jack->jack) { |
1367 | dev_warn(wm8350->dev, "Jack interrupt called with no jack\n"); | 1368 | dev_warn(wm8350->dev, "Jack interrupt called with no jack\n"); |
1368 | return; | 1369 | return IRQ_NONE; |
1369 | } | 1370 | } |
1370 | 1371 | ||
1371 | /* Debounce */ | 1372 | /* Debounce */ |
@@ -1378,6 +1379,8 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data) | |||
1378 | report = 0; | 1379 | report = 0; |
1379 | 1380 | ||
1380 | snd_soc_jack_report(jack->jack, report, jack->report); | 1381 | snd_soc_jack_report(jack->jack, report, jack->report); |
1382 | |||
1383 | return IRQ_HANDLED; | ||
1381 | } | 1384 | } |
1382 | 1385 | ||
1383 | /** | 1386 | /** |
@@ -1421,7 +1424,7 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which, | |||
1421 | wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena); | 1424 | wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena); |
1422 | 1425 | ||
1423 | /* Sync status */ | 1426 | /* Sync status */ |
1424 | wm8350_hp_jack_handler(wm8350, irq, priv); | 1427 | wm8350_hp_jack_handler(irq, priv); |
1425 | 1428 | ||
1426 | wm8350_unmask_irq(wm8350, irq); | 1429 | wm8350_unmask_irq(wm8350, irq); |
1427 | 1430 | ||
@@ -1485,9 +1488,11 @@ static int wm8350_probe(struct platform_device *pdev) | |||
1485 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); | 1488 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); |
1486 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); | 1489 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); |
1487 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L, | 1490 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L, |
1488 | wm8350_hp_jack_handler, priv); | 1491 | wm8350_hp_jack_handler, 0, "Left jack detect", |
1492 | priv); | ||
1489 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R, | 1493 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R, |
1490 | wm8350_hp_jack_handler, priv); | 1494 | wm8350_hp_jack_handler, 0, "Right jack detect", |
1495 | priv); | ||
1491 | 1496 | ||
1492 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 1497 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
1493 | if (ret < 0) { | 1498 | if (ret < 0) { |