public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: Arun Murthy <arun.murthy@stericsson.com>
Cc: dwmw2@infradead.org, linux-kernel@vger.kernel.org,
	karl.komierowski@stericsson.com, johan.palsson@stericsson.com,
	linus.walleij@linaro.org
Subject: [PATCH 1/6] ab8500_charger: Convert to the new USB OTG calls
Date: Wed, 14 Mar 2012 05:04:54 +0400	[thread overview]
Message-ID: <20120314010454.GA10798@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20120314005901.GB1778@oksana.dev.rtsoft.ru>

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>
---
 drivers/power/ab8500_charger.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index bbc541a..a7217d6 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -240,7 +240,7 @@ struct ab8500_charger {
 	struct work_struct usb_state_changed_work;
 	struct work_struct check_main_thermal_prot_work;
 	struct work_struct check_usb_thermal_prot_work;
-	struct otg_transceiver *otg;
+	struct usb_phy *usb_phy;
 	struct notifier_block nb;
 };
 
@@ -2516,8 +2516,8 @@ static int __devexit ab8500_charger_remove(struct platform_device *pdev)
 	if (ret < 0)
 		dev_err(di->dev, "%s mask and set failed\n", __func__);
 
-	otg_unregister_notifier(di->otg, &di->nb);
-	otg_put_transceiver(di->otg);
+	usb_unregister_notifier(di->usb_phy, &di->nb);
+	usb_put_transceiver(di->usb_phy);
 
 	/* Delete the work queue */
 	destroy_workqueue(di->charger_wq);
@@ -2685,17 +2685,17 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
 		goto free_ac;
 	}
 
-	di->otg = otg_get_transceiver();
-	if (!di->otg) {
-		dev_err(di->dev, "failed to get otg transceiver\n");
+	di->usb_phy = usb_get_transceiver();
+	if (!di->usb_phy) {
+		dev_err(di->dev, "failed to get usb transceiver\n");
 		ret = -EINVAL;
 		goto free_usb;
 	}
 	di->nb.notifier_call = ab8500_charger_usb_notifier_call;
-	ret = otg_register_notifier(di->otg, &di->nb);
+	ret = usb_register_notifier(di->usb_phy, &di->nb);
 	if (ret) {
-		dev_err(di->dev, "failed to register otg notifier\n");
-		goto put_otg_transceiver;
+		dev_err(di->dev, "failed to register usb notifier\n");
+		goto put_usb_phy;
 	}
 
 	/* Identify the connected charger types during startup */
@@ -2736,15 +2736,15 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
 	return ret;
 
 free_irq:
-	otg_unregister_notifier(di->otg, &di->nb);
+	usb_unregister_notifier(di->usb_phy, &di->nb);
 
 	/* We also have to free all successfully registered irqs */
 	for (i = i - 1; i >= 0; i--) {
 		irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
 		free_irq(irq, di);
 	}
-put_otg_transceiver:
-	otg_put_transceiver(di->otg);
+put_usb_phy:
+	usb_put_transceiver(di->usb_phy);
 free_usb:
 	power_supply_unregister(&di->usb_chg.psy);
 free_ac:
-- 
1.7.9


  reply	other threads:[~2012-03-14  1:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 16:24 [PATCH 0/4] AB8500 Battery Management Driver Arun Murthy
2012-02-29 16:24 ` [PATCH 1/4] power: abx500-chargalg: Add abx500 charging algorithm Arun Murthy
2012-02-29 16:24 ` [PATCH 2/4] power: ab8500-charger: AB8500 charger driver Arun Murthy
2012-02-29 17:50   ` Andi
2012-02-29 18:21     ` Arun Murthy
2012-02-29 16:24 ` [PATCH 3/4] power: ab8500-fg: A8500 fuel gauge driver Arun Murthy
2012-02-29 16:24 ` [PATCH 4/4] power: ab8500-btemp: AB8500 battery temperature driver Arun Murthy
2012-03-14  0:59 ` [PATCH 0/4] AB8500 Battery Management Driver Anton Vorontsov
2012-03-14  1:04   ` Anton Vorontsov [this message]
2012-03-14  4:03     ` [PATCH 1/6] ab8500_charger: Convert to the new USB OTG calls Arun MURTHY
2012-03-14  1:05   ` [PATCH 2/6] ab8500_btemp: Get rid of 'enum adc_therm' Anton Vorontsov
2012-03-14  4:25     ` Arun MURTHY
2012-03-14  1:05   ` [PATCH 3/6] ab8500_fg: Get rid of 'struct v_to_cap' Anton Vorontsov
2012-03-14  4:36     ` Arun MURTHY
2012-03-14  1:05   ` [PATCH 4/6] ab8500_fg: Get rid of 'struct battery_type' Anton Vorontsov
2012-03-14  4:36     ` Arun MURTHY
2012-03-14  1:05   ` [PATCH 5/6] ab8500_fg: Fix copy-paste error Anton Vorontsov
2012-03-14  4:36     ` Arun MURTHY
2012-03-14  5:45     ` Arun MURTHY
2012-03-14  1:05   ` [PATCH 6/6] ab8500: Turn unneeded global symbols into local ones Anton Vorontsov
2012-03-14  4:37     ` Arun MURTHY

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=20120314010454.GA10798@oksana.dev.rtsoft.ru \
    --to=anton.vorontsov@linaro.org \
    --cc=arun.murthy@stericsson.com \
    --cc=dwmw2@infradead.org \
    --cc=johan.palsson@stericsson.com \
    --cc=karl.komierowski@stericsson.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.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