aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-03-13 20:22:17 -0400
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-03-26 12:41:07 -0400
commitefd71c89a411d72f1e20d91e34f0779e0e0019b4 (patch)
treed08680f45a91b87bea4ed871a814ab0b0f56d817 /drivers/power
parent1f855824757efab36e08f8fc640f4d9fd1d3d1ab (diff)
ab8500_charger: Convert to the new USB OTG calls
This patch fixes the following build errors: ab8500_charger.c: In function 'ab8500_charger_remove': ab8500_charger.c:2519:2: error: implicit declaration of function 'otg_unregister_notifier' [-Werror=implicit-function-declaration] ab8500_charger.c:2520:2: error: implicit declaration of function 'otg_put_transceiver' [-Werror=implicit-function-declaration] ab8500_charger.c: In function 'ab8500_charger_probe': ab8500_charger.c:2688:2: error: implicit declaration of function 'otg_get_transceiver' [-Werror=implicit-function-declaration] ab8500_charger.c:2688:10: warning: assignment makes pointer from integer without a cast [enabled by default] ab8500_charger.c:2695:2: error: implicit declaration of function 'otg_register_notifier' [-Werror=implicit-function-declaration] Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/ab8500_charger.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index bbc541a59a38..a7217d6b52bd 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -240,7 +240,7 @@ struct ab8500_charger {
240 struct work_struct usb_state_changed_work; 240 struct work_struct usb_state_changed_work;
241 struct work_struct check_main_thermal_prot_work; 241 struct work_struct check_main_thermal_prot_work;
242 struct work_struct check_usb_thermal_prot_work; 242 struct work_struct check_usb_thermal_prot_work;
243 struct otg_transceiver *otg; 243 struct usb_phy *usb_phy;
244 struct notifier_block nb; 244 struct notifier_block nb;
245}; 245};
246 246
@@ -2516,8 +2516,8 @@ static int __devexit ab8500_charger_remove(struct platform_device *pdev)
2516 if (ret < 0) 2516 if (ret < 0)
2517 dev_err(di->dev, "%s mask and set failed\n", __func__); 2517 dev_err(di->dev, "%s mask and set failed\n", __func__);
2518 2518
2519 otg_unregister_notifier(di->otg, &di->nb); 2519 usb_unregister_notifier(di->usb_phy, &di->nb);
2520 otg_put_transceiver(di->otg); 2520 usb_put_transceiver(di->usb_phy);
2521 2521
2522 /* Delete the work queue */ 2522 /* Delete the work queue */
2523 destroy_workqueue(di->charger_wq); 2523 destroy_workqueue(di->charger_wq);
@@ -2685,17 +2685,17 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
2685 goto free_ac; 2685 goto free_ac;
2686 } 2686 }
2687 2687
2688 di->otg = otg_get_transceiver(); 2688 di->usb_phy = usb_get_transceiver();
2689 if (!di->otg) { 2689 if (!di->usb_phy) {
2690 dev_err(di->dev, "failed to get otg transceiver\n"); 2690 dev_err(di->dev, "failed to get usb transceiver\n");
2691 ret = -EINVAL; 2691 ret = -EINVAL;
2692 goto free_usb; 2692 goto free_usb;
2693 } 2693 }
2694 di->nb.notifier_call = ab8500_charger_usb_notifier_call; 2694 di->nb.notifier_call = ab8500_charger_usb_notifier_call;
2695 ret = otg_register_notifier(di->otg, &di->nb); 2695 ret = usb_register_notifier(di->usb_phy, &di->nb);
2696 if (ret) { 2696 if (ret) {
2697 dev_err(di->dev, "failed to register otg notifier\n"); 2697 dev_err(di->dev, "failed to register usb notifier\n");
2698 goto put_otg_transceiver; 2698 goto put_usb_phy;
2699 } 2699 }
2700 2700
2701 /* Identify the connected charger types during startup */ 2701 /* Identify the connected charger types during startup */
@@ -2736,15 +2736,15 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
2736 return ret; 2736 return ret;
2737 2737
2738free_irq: 2738free_irq:
2739 otg_unregister_notifier(di->otg, &di->nb); 2739 usb_unregister_notifier(di->usb_phy, &di->nb);
2740 2740
2741 /* We also have to free all successfully registered irqs */ 2741 /* We also have to free all successfully registered irqs */
2742 for (i = i - 1; i >= 0; i--) { 2742 for (i = i - 1; i >= 0; i--) {
2743 irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name); 2743 irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
2744 free_irq(irq, di); 2744 free_irq(irq, di);
2745 } 2745 }
2746put_otg_transceiver: 2746put_usb_phy:
2747 otg_put_transceiver(di->otg); 2747 usb_put_transceiver(di->usb_phy);
2748free_usb: 2748free_usb:
2749 power_supply_unregister(&di->usb_chg.psy); 2749 power_supply_unregister(&di->usb_chg.psy);
2750free_ac: 2750free_ac: