]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bus: imx-weim: use module_platform_driver()
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 14 Aug 2019 08:23:16 +0000 (10:23 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 19 Aug 2019 12:07:23 +0000 (14:07 +0200)
Switch from module_platform_driver_probe() to module_platform_driver().
The former is not suitable for booting with device tree as the driver
will be registered before the device and thus won't be probed again
when the device is present.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/bus/imx-weim.c

index cb7d5504a22a962ff7f7fb966264ef4f872a09b0..79af0c27f5a3d3d6ad7fdaf1ff100157bdcd9ece 100644 (file)
@@ -187,8 +187,7 @@ static int __init weim_timing_setup(struct device *dev,
        return 0;
 }
 
-static int __init weim_parse_dt(struct platform_device *pdev,
-                               void __iomem *base)
+static int weim_parse_dt(struct platform_device *pdev, void __iomem *base)
 {
        const struct of_device_id *of_id = of_match_device(weim_id_table,
                                                           &pdev->dev);
@@ -233,7 +232,7 @@ static int __init weim_parse_dt(struct platform_device *pdev,
        return ret;
 }
 
-static int __init weim_probe(struct platform_device *pdev)
+static int weim_probe(struct platform_device *pdev)
 {
        struct resource *res;
        struct clk *clk;
@@ -270,8 +269,9 @@ static struct platform_driver weim_driver = {
                .name           = "imx-weim",
                .of_match_table = weim_id_table,
        },
+       .probe = weim_probe,
 };
-module_platform_driver_probe(weim_driver, weim_probe);
+module_platform_driver(weim_driver);
 
 MODULE_AUTHOR("Freescale Semiconductor Inc.");
 MODULE_DESCRIPTION("i.MX EIM Controller Driver");