aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/ab8500_charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/ab8500_charger.c')
-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: