diff options
Diffstat (limited to 'drivers/power/wm831x_power.c')
-rw-r--r-- | drivers/power/wm831x_power.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/power/wm831x_power.c b/drivers/power/wm831x_power.c index f85e80b1b400..bf2ff4132478 100644 --- a/drivers/power/wm831x_power.c +++ b/drivers/power/wm831x_power.c | |||
@@ -536,9 +536,9 @@ static __devinit int wm831x_power_probe(struct platform_device *pdev) | |||
536 | goto err_battery; | 536 | goto err_battery; |
537 | 537 | ||
538 | irq = platform_get_irq_byname(pdev, "SYSLO"); | 538 | irq = platform_get_irq_byname(pdev, "SYSLO"); |
539 | ret = wm831x_request_irq(wm831x, irq, wm831x_syslo_irq, | 539 | ret = request_threaded_irq(irq, NULL, wm831x_syslo_irq, |
540 | IRQF_TRIGGER_RISING, "SYSLO", | 540 | IRQF_TRIGGER_RISING, "System power low", |
541 | power); | 541 | power); |
542 | if (ret != 0) { | 542 | if (ret != 0) { |
543 | dev_err(&pdev->dev, "Failed to request SYSLO IRQ %d: %d\n", | 543 | dev_err(&pdev->dev, "Failed to request SYSLO IRQ %d: %d\n", |
544 | irq, ret); | 544 | irq, ret); |
@@ -546,9 +546,9 @@ static __devinit int wm831x_power_probe(struct platform_device *pdev) | |||
546 | } | 546 | } |
547 | 547 | ||
548 | irq = platform_get_irq_byname(pdev, "PWR SRC"); | 548 | irq = platform_get_irq_byname(pdev, "PWR SRC"); |
549 | ret = wm831x_request_irq(wm831x, irq, wm831x_pwr_src_irq, | 549 | ret = request_threaded_irq(irq, NULL, wm831x_pwr_src_irq, |
550 | IRQF_TRIGGER_RISING, "Power source", | 550 | IRQF_TRIGGER_RISING, "Power source", |
551 | power); | 551 | power); |
552 | if (ret != 0) { | 552 | if (ret != 0) { |
553 | dev_err(&pdev->dev, "Failed to request PWR SRC IRQ %d: %d\n", | 553 | dev_err(&pdev->dev, "Failed to request PWR SRC IRQ %d: %d\n", |
554 | irq, ret); | 554 | irq, ret); |
@@ -557,10 +557,10 @@ static __devinit int wm831x_power_probe(struct platform_device *pdev) | |||
557 | 557 | ||
558 | for (i = 0; i < ARRAY_SIZE(wm831x_bat_irqs); i++) { | 558 | for (i = 0; i < ARRAY_SIZE(wm831x_bat_irqs); i++) { |
559 | irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]); | 559 | irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]); |
560 | ret = wm831x_request_irq(wm831x, irq, wm831x_bat_irq, | 560 | ret = request_threaded_irq(irq, NULL, wm831x_bat_irq, |
561 | IRQF_TRIGGER_RISING, | 561 | IRQF_TRIGGER_RISING, |
562 | wm831x_bat_irqs[i], | 562 | wm831x_bat_irqs[i], |
563 | power); | 563 | power); |
564 | if (ret != 0) { | 564 | if (ret != 0) { |
565 | dev_err(&pdev->dev, | 565 | dev_err(&pdev->dev, |
566 | "Failed to request %s IRQ %d: %d\n", | 566 | "Failed to request %s IRQ %d: %d\n", |
@@ -574,13 +574,13 @@ static __devinit int wm831x_power_probe(struct platform_device *pdev) | |||
574 | err_bat_irq: | 574 | err_bat_irq: |
575 | for (; i >= 0; i--) { | 575 | for (; i >= 0; i--) { |
576 | irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]); | 576 | irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]); |
577 | wm831x_free_irq(wm831x, irq, power); | 577 | free_irq(irq, power); |
578 | } | 578 | } |
579 | irq = platform_get_irq_byname(pdev, "PWR SRC"); | 579 | irq = platform_get_irq_byname(pdev, "PWR SRC"); |
580 | wm831x_free_irq(wm831x, irq, power); | 580 | free_irq(irq, power); |
581 | err_syslo: | 581 | err_syslo: |
582 | irq = platform_get_irq_byname(pdev, "SYSLO"); | 582 | irq = platform_get_irq_byname(pdev, "SYSLO"); |
583 | wm831x_free_irq(wm831x, irq, power); | 583 | free_irq(irq, power); |
584 | err_usb: | 584 | err_usb: |
585 | power_supply_unregister(usb); | 585 | power_supply_unregister(usb); |
586 | err_battery: | 586 | err_battery: |
@@ -595,19 +595,18 @@ err_kmalloc: | |||
595 | static __devexit int wm831x_power_remove(struct platform_device *pdev) | 595 | static __devexit int wm831x_power_remove(struct platform_device *pdev) |
596 | { | 596 | { |
597 | struct wm831x_power *wm831x_power = platform_get_drvdata(pdev); | 597 | struct wm831x_power *wm831x_power = platform_get_drvdata(pdev); |
598 | struct wm831x *wm831x = wm831x_power->wm831x; | ||
599 | int irq, i; | 598 | int irq, i; |
600 | 599 | ||
601 | for (i = 0; i < ARRAY_SIZE(wm831x_bat_irqs); i++) { | 600 | for (i = 0; i < ARRAY_SIZE(wm831x_bat_irqs); i++) { |
602 | irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]); | 601 | irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]); |
603 | wm831x_free_irq(wm831x, irq, wm831x_power); | 602 | free_irq(irq, wm831x_power); |
604 | } | 603 | } |
605 | 604 | ||
606 | irq = platform_get_irq_byname(pdev, "PWR SRC"); | 605 | irq = platform_get_irq_byname(pdev, "PWR SRC"); |
607 | wm831x_free_irq(wm831x, irq, wm831x_power); | 606 | free_irq(irq, wm831x_power); |
608 | 607 | ||
609 | irq = platform_get_irq_byname(pdev, "SYSLO"); | 608 | irq = platform_get_irq_byname(pdev, "SYSLO"); |
610 | wm831x_free_irq(wm831x, irq, wm831x_power); | 609 | free_irq(irq, wm831x_power); |
611 | 610 | ||
612 | power_supply_unregister(&wm831x_power->battery); | 611 | power_supply_unregister(&wm831x_power->battery); |
613 | power_supply_unregister(&wm831x_power->wall); | 612 | power_supply_unregister(&wm831x_power->wall); |