diff options
author | Felipe Balbi <balbi@ti.com> | 2013-03-07 04:23:50 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 05:18:05 -0400 |
commit | 820d08835d2688963607dbd08e50d89a20cb0442 (patch) | |
tree | 226ee331860433809376a1c921b3c63a6b57daed | |
parent | edc7cb2e955f222fe51cd44c1cf9c94d58017344 (diff) |
usb: power: pda_power: check against CONFIG_USB_PHY
CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/power/pda_power.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c index 7df7c5facc10..0c52e2a0d90c 100644 --- a/drivers/power/pda_power.c +++ b/drivers/power/pda_power.c | |||
@@ -35,7 +35,7 @@ static struct timer_list supply_timer; | |||
35 | static struct timer_list polling_timer; | 35 | static struct timer_list polling_timer; |
36 | static int polling; | 36 | static int polling; |
37 | 37 | ||
38 | #ifdef CONFIG_USB_OTG_UTILS | 38 | #if IS_ENABLED(CONFIG_USB_PHY) |
39 | static struct usb_phy *transceiver; | 39 | static struct usb_phy *transceiver; |
40 | static struct notifier_block otg_nb; | 40 | static struct notifier_block otg_nb; |
41 | #endif | 41 | #endif |
@@ -218,7 +218,7 @@ static void polling_timer_func(unsigned long unused) | |||
218 | jiffies + msecs_to_jiffies(pdata->polling_interval)); | 218 | jiffies + msecs_to_jiffies(pdata->polling_interval)); |
219 | } | 219 | } |
220 | 220 | ||
221 | #ifdef CONFIG_USB_OTG_UTILS | 221 | #if IS_ENABLED(CONFIG_USB_PHY) |
222 | static int otg_is_usb_online(void) | 222 | static int otg_is_usb_online(void) |
223 | { | 223 | { |
224 | return (transceiver->last_event == USB_EVENT_VBUS || | 224 | return (transceiver->last_event == USB_EVENT_VBUS || |
@@ -315,7 +315,7 @@ static int pda_power_probe(struct platform_device *pdev) | |||
315 | pda_psy_usb.num_supplicants = pdata->num_supplicants; | 315 | pda_psy_usb.num_supplicants = pdata->num_supplicants; |
316 | } | 316 | } |
317 | 317 | ||
318 | #ifdef CONFIG_USB_OTG_UTILS | 318 | #if IS_ENABLED(CONFIG_USB_PHY) |
319 | transceiver = usb_get_phy(USB_PHY_TYPE_USB2); | 319 | transceiver = usb_get_phy(USB_PHY_TYPE_USB2); |
320 | if (!IS_ERR_OR_NULL(transceiver)) { | 320 | if (!IS_ERR_OR_NULL(transceiver)) { |
321 | if (!pdata->is_usb_online) | 321 | if (!pdata->is_usb_online) |
@@ -367,7 +367,7 @@ static int pda_power_probe(struct platform_device *pdev) | |||
367 | } | 367 | } |
368 | } | 368 | } |
369 | 369 | ||
370 | #ifdef CONFIG_USB_OTG_UTILS | 370 | #if IS_ENABLED(CONFIG_USB_PHY) |
371 | if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier) { | 371 | if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier) { |
372 | otg_nb.notifier_call = otg_handle_notification; | 372 | otg_nb.notifier_call = otg_handle_notification; |
373 | ret = usb_register_notifier(transceiver, &otg_nb); | 373 | ret = usb_register_notifier(transceiver, &otg_nb); |
@@ -391,7 +391,7 @@ static int pda_power_probe(struct platform_device *pdev) | |||
391 | 391 | ||
392 | return 0; | 392 | return 0; |
393 | 393 | ||
394 | #ifdef CONFIG_USB_OTG_UTILS | 394 | #if IS_ENABLED(CONFIG_USB_PHY) |
395 | otg_reg_notifier_failed: | 395 | otg_reg_notifier_failed: |
396 | if (pdata->is_usb_online && usb_irq) | 396 | if (pdata->is_usb_online && usb_irq) |
397 | free_irq(usb_irq->start, &pda_psy_usb); | 397 | free_irq(usb_irq->start, &pda_psy_usb); |
@@ -402,7 +402,7 @@ usb_irq_failed: | |||
402 | usb_supply_failed: | 402 | usb_supply_failed: |
403 | if (pdata->is_ac_online && ac_irq) | 403 | if (pdata->is_ac_online && ac_irq) |
404 | free_irq(ac_irq->start, &pda_psy_ac); | 404 | free_irq(ac_irq->start, &pda_psy_ac); |
405 | #ifdef CONFIG_USB_OTG_UTILS | 405 | #if IS_ENABLED(CONFIG_USB_PHY) |
406 | if (!IS_ERR_OR_NULL(transceiver)) | 406 | if (!IS_ERR_OR_NULL(transceiver)) |
407 | usb_put_phy(transceiver); | 407 | usb_put_phy(transceiver); |
408 | #endif | 408 | #endif |
@@ -437,7 +437,7 @@ static int pda_power_remove(struct platform_device *pdev) | |||
437 | power_supply_unregister(&pda_psy_usb); | 437 | power_supply_unregister(&pda_psy_usb); |
438 | if (pdata->is_ac_online) | 438 | if (pdata->is_ac_online) |
439 | power_supply_unregister(&pda_psy_ac); | 439 | power_supply_unregister(&pda_psy_ac); |
440 | #ifdef CONFIG_USB_OTG_UTILS | 440 | #if IS_ENABLED(CONFIG_USB_PHY) |
441 | if (!IS_ERR_OR_NULL(transceiver)) | 441 | if (!IS_ERR_OR_NULL(transceiver)) |
442 | usb_put_phy(transceiver); | 442 | usb_put_phy(transceiver); |
443 | #endif | 443 | #endif |