Skip to content

Commit

Permalink
twl4030_charger: convert to module_platform_driver instead of ..._probe.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
pavelmachek authored and sre committed Aug 5, 2015
1 parent e57c4a6 commit 7396f70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/power/twl4030_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 7396f70

Please sign in to comment.