diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-01 11:50:43 -0500 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-03-26 10:15:04 -0400 |
commit | dfda9c27ba15330f37453c389d775ecf9e981d05 (patch) | |
tree | c8b6eb3bcab3fc4f15d5949c858342cbfa56ef31 /drivers/regulator/wm831x-dcdc.c | |
parent | 23c2f041efa891e6ec0706dc9ad4f776a9aa8c14 (diff) |
regulator: Convert WM831x regulators to genirq
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/wm831x-dcdc.c')
-rw-r--r-- | drivers/regulator/wm831x-dcdc.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 06df898842c0..857d741539da 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c | |||
@@ -565,9 +565,8 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev) | |||
565 | } | 565 | } |
566 | 566 | ||
567 | irq = platform_get_irq_byname(pdev, "UV"); | 567 | irq = platform_get_irq_byname(pdev, "UV"); |
568 | ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq, | 568 | ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq, |
569 | IRQF_TRIGGER_RISING, dcdc->name, | 569 | IRQF_TRIGGER_RISING, dcdc->name, dcdc); |
570 | dcdc); | ||
571 | if (ret != 0) { | 570 | if (ret != 0) { |
572 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", | 571 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", |
573 | irq, ret); | 572 | irq, ret); |
@@ -575,9 +574,8 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev) | |||
575 | } | 574 | } |
576 | 575 | ||
577 | irq = platform_get_irq_byname(pdev, "HC"); | 576 | irq = platform_get_irq_byname(pdev, "HC"); |
578 | ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_oc_irq, | 577 | ret = request_threaded_irq(irq, NULL, wm831x_dcdc_oc_irq, |
579 | IRQF_TRIGGER_RISING, dcdc->name, | 578 | IRQF_TRIGGER_RISING, dcdc->name, dcdc); |
580 | dcdc); | ||
581 | if (ret != 0) { | 579 | if (ret != 0) { |
582 | dev_err(&pdev->dev, "Failed to request HC IRQ %d: %d\n", | 580 | dev_err(&pdev->dev, "Failed to request HC IRQ %d: %d\n", |
583 | irq, ret); | 581 | irq, ret); |
@@ -589,7 +587,7 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev) | |||
589 | return 0; | 587 | return 0; |
590 | 588 | ||
591 | err_uv: | 589 | err_uv: |
592 | wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), dcdc); | 590 | free_irq(platform_get_irq_byname(pdev, "UV"), dcdc); |
593 | err_regulator: | 591 | err_regulator: |
594 | regulator_unregister(dcdc->regulator); | 592 | regulator_unregister(dcdc->regulator); |
595 | err: | 593 | err: |
@@ -756,9 +754,8 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev) | |||
756 | } | 754 | } |
757 | 755 | ||
758 | irq = platform_get_irq_byname(pdev, "UV"); | 756 | irq = platform_get_irq_byname(pdev, "UV"); |
759 | ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq, | 757 | ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq, |
760 | IRQF_TRIGGER_RISING, dcdc->name, | 758 | IRQF_TRIGGER_RISING, dcdc->name, dcdc); |
761 | dcdc); | ||
762 | if (ret != 0) { | 759 | if (ret != 0) { |
763 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", | 760 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", |
764 | irq, ret); | 761 | irq, ret); |
@@ -885,9 +882,9 @@ static __devinit int wm831x_boostp_probe(struct platform_device *pdev) | |||
885 | } | 882 | } |
886 | 883 | ||
887 | irq = platform_get_irq_byname(pdev, "UV"); | 884 | irq = platform_get_irq_byname(pdev, "UV"); |
888 | ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq, | 885 | ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq, |
889 | IRQF_TRIGGER_RISING, dcdc->name, | 886 | IRQF_TRIGGER_RISING, dcdc->name, |
890 | dcdc); | 887 | dcdc); |
891 | if (ret != 0) { | 888 | if (ret != 0) { |
892 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", | 889 | dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", |
893 | irq, ret); | 890 | irq, ret); |
@@ -908,11 +905,10 @@ err: | |||
908 | static __devexit int wm831x_boostp_remove(struct platform_device *pdev) | 905 | static __devexit int wm831x_boostp_remove(struct platform_device *pdev) |
909 | { | 906 | { |
910 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); | 907 | struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); |
911 | struct wm831x *wm831x = dcdc->wm831x; | ||
912 | 908 | ||
913 | platform_set_drvdata(pdev, NULL); | 909 | platform_set_drvdata(pdev, NULL); |
914 | 910 | ||
915 | wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), dcdc); | 911 | free_irq(platform_get_irq_byname(pdev, "UV"), dcdc); |
916 | regulator_unregister(dcdc->regulator); | 912 | regulator_unregister(dcdc->regulator); |
917 | kfree(dcdc); | 913 | kfree(dcdc); |
918 | 914 | ||