[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150730001124.4012.45460.stgit@noble>
Date: Thu, 30 Jul 2015 10:11:24 +1000
From: NeilBrown <neil@...wn.name>
To: Sebastian Reichel <sre@...nel.org>
Cc: Samuel Ortiz <sameo@...ux.intel.com>, linux-pm@...r.kernel.org,
Tony Lindgren <tony@...mide.com>,
David Woodhouse <dwmw2@...radead.org>,
linux-kernel@...r.kernel.org,
real GTA04 owners <gta04-owner@...delico.com>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Pavel Machek <pavel@....cz>, linux-omap@...r.kernel.org,
Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 02/13] twl4030_charger: convert to module_platform_driver
instead of ..._probe.
From: Pavel Machek <pavel@....cz>
Drivers using module_platform_driver_probe cannot return
EPROBE_DEFER from the probe function, which makes them rather useless
these days...
Convert to module_platform_driver() so EPROBE_DEFER can be used.
Signed-off-by: Pavel Machek <pavel@....cz>
Signed-off-by: NeilBrown <neil@...wn.name>
---
drivers/power/twl4030_charger.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index fe71c61109f5..045238370d3f 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -568,7 +568,7 @@ static const struct power_supply_desc twl4030_bci_usb_desc = {
.get_property = twl4030_bci_get_property,
};
-static int __init twl4030_bci_probe(struct platform_device *pdev)
+static int twl4030_bci_probe(struct platform_device *pdev)
{
struct twl4030_bci *bci;
const struct twl4030_bci_platform_data *pdata = pdev->dev.platform_data;
@@ -692,14 +692,14 @@ static const struct of_device_id twl_bci_of_match[] = {
MODULE_DEVICE_TABLE(of, twl_bci_of_match);
static struct platform_driver twl4030_bci_driver = {
+ .probe = twl4030_bci_probe,
.driver = {
.name = "twl4030_bci",
.of_match_table = of_match_ptr(twl_bci_of_match),
},
.remove = __exit_p(twl4030_bci_remove),
};
-
-module_platform_driver_probe(twl4030_bci_driver, twl4030_bci_probe);
+module_platform_driver(twl4030_bci_driver);
MODULE_AUTHOR("GraÅžvydas Ignotas");
MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists