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