Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Linux USB Mailing List
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Greg KH
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	cbou-JGs/UdohzUI@public.gmane.org,
	dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Subject: [PATCH 06/10] usb: power: pda_power: check against CONFIG_USB_PHY
Date: Thu, 7 Mar 2013 11:36:05 +0200	[thread overview]
Message-ID: <1362648969-13737-7-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1362648969-13737-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>

CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.

Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
---
 drivers/power/pda_power.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index 7df7c5f..0c52e2a 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -35,7 +35,7 @@ static struct timer_list supply_timer;
 static struct timer_list polling_timer;
 static int polling;
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 static struct usb_phy *transceiver;
 static struct notifier_block otg_nb;
 #endif
@@ -218,7 +218,7 @@ static void polling_timer_func(unsigned long unused)
 		  jiffies + msecs_to_jiffies(pdata->polling_interval));
 }
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 static int otg_is_usb_online(void)
 {
 	return (transceiver->last_event == USB_EVENT_VBUS ||
@@ -315,7 +315,7 @@ static int pda_power_probe(struct platform_device *pdev)
 		pda_psy_usb.num_supplicants = pdata->num_supplicants;
 	}
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 	transceiver = usb_get_phy(USB_PHY_TYPE_USB2);
 	if (!IS_ERR_OR_NULL(transceiver)) {
 		if (!pdata->is_usb_online)
@@ -367,7 +367,7 @@ static int pda_power_probe(struct platform_device *pdev)
 		}
 	}
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 	if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier) {
 		otg_nb.notifier_call = otg_handle_notification;
 		ret = usb_register_notifier(transceiver, &otg_nb);
@@ -391,7 +391,7 @@ static int pda_power_probe(struct platform_device *pdev)
 
 	return 0;
 
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 otg_reg_notifier_failed:
 	if (pdata->is_usb_online && usb_irq)
 		free_irq(usb_irq->start, &pda_psy_usb);
@@ -402,7 +402,7 @@ usb_irq_failed:
 usb_supply_failed:
 	if (pdata->is_ac_online && ac_irq)
 		free_irq(ac_irq->start, &pda_psy_ac);
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 	if (!IS_ERR_OR_NULL(transceiver))
 		usb_put_phy(transceiver);
 #endif
@@ -437,7 +437,7 @@ static int pda_power_remove(struct platform_device *pdev)
 		power_supply_unregister(&pda_psy_usb);
 	if (pdata->is_ac_online)
 		power_supply_unregister(&pda_psy_ac);
-#ifdef CONFIG_USB_OTG_UTILS
+#if IS_ENABLED(CONFIG_USB_PHY)
 	if (!IS_ERR_OR_NULL(transceiver))
 		usb_put_phy(transceiver);
 #endif
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-03-07  9:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07  9:35 [PATCH 00/10] usb: phy: cleanups to Kconfig and directories Felipe Balbi
2013-03-07  9:36 ` [PATCH 01/10] usb: otg: prefix otg_state_string with usb_ Felipe Balbi
2013-03-07  9:36 ` [PATCH 02/10] usb: otg: move usb_otg_state_string to usb-common.c Felipe Balbi
2013-03-07  9:36 ` [PATCH 03/10] usb: phy: convert EXPORT_SYMBOL to EXPORT_SYMBOL_GPL Felipe Balbi
2013-03-07  9:36 ` [PATCH 04/10] usb: phy: move all PHY drivers to drivers/usb/phy/ Felipe Balbi
2013-03-07  9:36 ` [PATCH 05/10] usb: phy: make it a menuconfig Felipe Balbi
2013-03-07  9:36 ` [PATCH 07/10] usb: gadget: mv_udc_core: check against CONFIG_USB_PHY Felipe Balbi
2013-03-07  9:36 ` [PATCH 09/10] usb: ehci: tegra: " Felipe Balbi
     [not found]   ` <1362648969-13737-10-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-03-07 20:54     ` Stephen Warren
2013-03-08  7:10       ` Felipe Balbi
2013-03-07  9:36 ` [PATCH 10/10] usb: phy: remove CONFIG_USB_OTG_UTILS Felipe Balbi
     [not found]   ` <1362648969-13737-11-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-03-07 14:41     ` [PATCH v2] " Felipe Balbi
2013-03-07 16:01 ` [PATCH 00/10] usb: phy: cleanups to Kconfig and directories Alan Stern
     [not found]   ` <Pine.LNX.4.44L0.1303071101190.1646-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2013-03-07 16:41     ` Felipe Balbi
     [not found] ` <1362648969-13737-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-03-07  9:36   ` Felipe Balbi [this message]
2013-03-07  9:36   ` [PATCH 08/10] usb: ehci: marvel: check against CONFIG_USB_PHY Felipe Balbi
2013-03-07 21:20   ` [PATCH 00/10] usb: phy: cleanups to Kconfig and directories Stephen Warren
     [not found]     ` <513904A4.7040101-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-08  7:14       ` Felipe Balbi
     [not found]         ` <20130308071453.GD21589-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-03-08 17:14           ` Stephen Warren
     [not found]             ` <513A1C63.9050704-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-08 18:26               ` Felipe Balbi
     [not found]                 ` <20130308182623.GD900-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-03-08 18:37                   ` Stephen Warren
     [not found]                     ` <513A2FDD.2040800-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-08 23:08                       ` Arnd Bergmann
     [not found]                         ` <201303082308.31499.arnd-r2nGTMty4D4@public.gmane.org>
2013-03-08 23:23                           ` Stephen Warren
     [not found]                             ` <513A72E8.2070707-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-08 23:56                               ` Arnd Bergmann
     [not found]                                 ` <201303082356.35033.arnd-r2nGTMty4D4@public.gmane.org>
2013-03-09  0:10                                   ` Stephen Warren
2013-03-14 11:01                     ` Felipe Balbi
     [not found]                       ` <20130314110129.GI32369-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-03-15 20:50                         ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362648969-13737-7-git-send-email-balbi@ti.com \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=cbou-JGs/UdohzUI@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox