diff options
author | Pavel Machek <pavel@ucw.cz> | 2015-07-29 20:11:24 -0400 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-08-04 23:10:54 -0400 |
commit | 7396f708b9f1d8874dda9c6386c37b065d99b68f (patch) | |
tree | 7c50b2585a41eda5614b8c529c9fd266430c0507 /drivers/power | |
parent | e57c4a67d71275e4a15b9f0f92a322ea27b26a6e (diff) |
twl4030_charger: convert to module_platform_driver instead of ..._probe.
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@ucw.cz>
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/twl4030_charger.c | 6 |
1 files 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 = { | |||
568 | .get_property = twl4030_bci_get_property, | 568 | .get_property = twl4030_bci_get_property, |
569 | }; | 569 | }; |
570 | 570 | ||
571 | static int __init twl4030_bci_probe(struct platform_device *pdev) | 571 | static int twl4030_bci_probe(struct platform_device *pdev) |
572 | { | 572 | { |
573 | struct twl4030_bci *bci; | 573 | struct twl4030_bci *bci; |
574 | const struct twl4030_bci_platform_data *pdata = pdev->dev.platform_data; | 574 | 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[] = { | |||
692 | MODULE_DEVICE_TABLE(of, twl_bci_of_match); | 692 | MODULE_DEVICE_TABLE(of, twl_bci_of_match); |
693 | 693 | ||
694 | static struct platform_driver twl4030_bci_driver = { | 694 | static struct platform_driver twl4030_bci_driver = { |
695 | .probe = twl4030_bci_probe, | ||
695 | .driver = { | 696 | .driver = { |
696 | .name = "twl4030_bci", | 697 | .name = "twl4030_bci", |
697 | .of_match_table = of_match_ptr(twl_bci_of_match), | 698 | .of_match_table = of_match_ptr(twl_bci_of_match), |
698 | }, | 699 | }, |
699 | .remove = __exit_p(twl4030_bci_remove), | 700 | .remove = __exit_p(twl4030_bci_remove), |
700 | }; | 701 | }; |
701 | 702 | module_platform_driver(twl4030_bci_driver); | |
702 | module_platform_driver_probe(twl4030_bci_driver, twl4030_bci_probe); | ||
703 | 703 | ||
704 | MODULE_AUTHOR("Gražvydas Ignotas"); | 704 | MODULE_AUTHOR("Gražvydas Ignotas"); |
705 | MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver"); | 705 | MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver"); |