Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: Convert WM831x regulators to genirq

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by

Mark Brown and committed by
Liam Girdwood
dfda9c27 23c2f041

+21 -30
+11 -15
drivers/regulator/wm831x-dcdc.c
··· 565 565 } 566 566 567 567 irq = platform_get_irq_byname(pdev, "UV"); 568 - ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq, 569 - IRQF_TRIGGER_RISING, dcdc->name, 570 - dcdc); 568 + ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq, 569 + IRQF_TRIGGER_RISING, dcdc->name, dcdc); 571 570 if (ret != 0) { 572 571 dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", 573 572 irq, ret); ··· 574 575 } 575 576 576 577 irq = platform_get_irq_byname(pdev, "HC"); 577 - ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_oc_irq, 578 - IRQF_TRIGGER_RISING, dcdc->name, 579 - dcdc); 578 + ret = request_threaded_irq(irq, NULL, wm831x_dcdc_oc_irq, 579 + IRQF_TRIGGER_RISING, dcdc->name, dcdc); 580 580 if (ret != 0) { 581 581 dev_err(&pdev->dev, "Failed to request HC IRQ %d: %d\n", 582 582 irq, ret); ··· 587 589 return 0; 588 590 589 591 err_uv: 590 - wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), dcdc); 592 + free_irq(platform_get_irq_byname(pdev, "UV"), dcdc); 591 593 err_regulator: 592 594 regulator_unregister(dcdc->regulator); 593 595 err: ··· 754 756 } 755 757 756 758 irq = platform_get_irq_byname(pdev, "UV"); 757 - ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq, 758 - IRQF_TRIGGER_RISING, dcdc->name, 759 - dcdc); 759 + ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq, 760 + IRQF_TRIGGER_RISING, dcdc->name, dcdc); 760 761 if (ret != 0) { 761 762 dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", 762 763 irq, ret); ··· 882 885 } 883 886 884 887 irq = platform_get_irq_byname(pdev, "UV"); 885 - ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq, 886 - IRQF_TRIGGER_RISING, dcdc->name, 887 - dcdc); 888 + ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq, 889 + IRQF_TRIGGER_RISING, dcdc->name, 890 + dcdc); 888 891 if (ret != 0) { 889 892 dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", 890 893 irq, ret); ··· 905 908 static __devexit int wm831x_boostp_remove(struct platform_device *pdev) 906 909 { 907 910 struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev); 908 - struct wm831x *wm831x = dcdc->wm831x; 909 911 910 912 platform_set_drvdata(pdev, NULL); 911 913 912 - wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), dcdc); 914 + free_irq(platform_get_irq_byname(pdev, "UV"), dcdc); 913 915 regulator_unregister(dcdc->regulator); 914 916 kfree(dcdc); 915 917
+3 -5
drivers/regulator/wm831x-isink.c
··· 198 198 } 199 199 200 200 irq = platform_get_irq(pdev, 0); 201 - ret = wm831x_request_irq(wm831x, irq, wm831x_isink_irq, 202 - IRQF_TRIGGER_RISING, isink->name, 203 - isink); 201 + ret = request_threaded_irq(irq, NULL, wm831x_isink_irq, 202 + IRQF_TRIGGER_RISING, isink->name, isink); 204 203 if (ret != 0) { 205 204 dev_err(&pdev->dev, "Failed to request ISINK IRQ %d: %d\n", 206 205 irq, ret); ··· 220 221 static __devexit int wm831x_isink_remove(struct platform_device *pdev) 221 222 { 222 223 struct wm831x_isink *isink = platform_get_drvdata(pdev); 223 - struct wm831x *wm831x = isink->wm831x; 224 224 225 225 platform_set_drvdata(pdev, NULL); 226 226 227 - wm831x_free_irq(wm831x, platform_get_irq(pdev, 0), isink); 227 + free_irq(platform_get_irq(pdev, 0), isink); 228 228 229 229 regulator_unregister(isink->regulator); 230 230 kfree(isink);
+7 -10
drivers/regulator/wm831x-ldo.c
··· 354 354 } 355 355 356 356 irq = platform_get_irq_byname(pdev, "UV"); 357 - ret = wm831x_request_irq(wm831x, irq, wm831x_ldo_uv_irq, 358 - IRQF_TRIGGER_RISING, ldo->name, 359 - ldo); 357 + ret = request_threaded_irq(irq, NULL, wm831x_ldo_uv_irq, 358 + IRQF_TRIGGER_RISING, ldo->name, 359 + ldo); 360 360 if (ret != 0) { 361 361 dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", 362 362 irq, ret); ··· 377 377 static __devexit int wm831x_gp_ldo_remove(struct platform_device *pdev) 378 378 { 379 379 struct wm831x_ldo *ldo = platform_get_drvdata(pdev); 380 - struct wm831x *wm831x = ldo->wm831x; 381 380 382 381 platform_set_drvdata(pdev, NULL); 383 382 384 - wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), ldo); 383 + free_irq(platform_get_irq_byname(pdev, "UV"), ldo); 385 384 regulator_unregister(ldo->regulator); 386 385 kfree(ldo); 387 386 ··· 618 619 } 619 620 620 621 irq = platform_get_irq_byname(pdev, "UV"); 621 - ret = wm831x_request_irq(wm831x, irq, wm831x_ldo_uv_irq, 622 - IRQF_TRIGGER_RISING, ldo->name, 623 - ldo); 622 + ret = request_threaded_irq(irq, NULL, wm831x_ldo_uv_irq, 623 + IRQF_TRIGGER_RISING, ldo->name, ldo); 624 624 if (ret != 0) { 625 625 dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", 626 626 irq, ret); ··· 640 642 static __devexit int wm831x_aldo_remove(struct platform_device *pdev) 641 643 { 642 644 struct wm831x_ldo *ldo = platform_get_drvdata(pdev); 643 - struct wm831x *wm831x = ldo->wm831x; 644 645 645 - wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), ldo); 646 + free_irq(platform_get_irq_byname(pdev, "UV"), ldo); 646 647 regulator_unregister(ldo->regulator); 647 648 kfree(ldo); 648 649