diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-06-29 00:27:52 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-08-16 00:59:43 -0400 |
commit | 29e54970c2681ad621d13df739d0cddf052acf9d (patch) | |
tree | 6cce0c0ec5e4da86f5d16b5464e71d8383cdb61e /drivers/bus | |
parent | b2d1fb7332f2bb8c0630f224d8e2151c0e157004 (diff) |
drivers: bus: imx-weim: use module_platform_driver_probe()
Driver should be called only once at startup, so code converted
to using module_platform_driver_probe().
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/imx-weim.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 0f4b08112afb..f8729247e48e 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c | |||
@@ -22,7 +22,7 @@ MODULE_DEVICE_TABLE(of, weim_id_table); | |||
22 | #define CS_REG_RANGE 0x18 | 22 | #define CS_REG_RANGE 0x18 |
23 | 23 | ||
24 | /* Parse and set the timing for this device. */ | 24 | /* Parse and set the timing for this device. */ |
25 | static int weim_timing_setup(struct device_node *np, void __iomem *base) | 25 | static int __init weim_timing_setup(struct device_node *np, void __iomem *base) |
26 | { | 26 | { |
27 | u32 value[CS_TIMING_LEN]; | 27 | u32 value[CS_TIMING_LEN]; |
28 | u32 cs_idx; | 28 | u32 cs_idx; |
@@ -49,7 +49,8 @@ static int weim_timing_setup(struct device_node *np, void __iomem *base) | |||
49 | return 0; | 49 | return 0; |
50 | } | 50 | } |
51 | 51 | ||
52 | static int weim_parse_dt(struct platform_device *pdev, void __iomem *base) | 52 | static int __init weim_parse_dt(struct platform_device *pdev, |
53 | void __iomem *base) | ||
53 | { | 54 | { |
54 | struct device_node *child; | 55 | struct device_node *child; |
55 | int ret; | 56 | int ret; |
@@ -73,7 +74,7 @@ static int weim_parse_dt(struct platform_device *pdev, void __iomem *base) | |||
73 | return ret; | 74 | return ret; |
74 | } | 75 | } |
75 | 76 | ||
76 | static int weim_probe(struct platform_device *pdev) | 77 | static int __init weim_probe(struct platform_device *pdev) |
77 | { | 78 | { |
78 | struct resource *res; | 79 | struct resource *res; |
79 | struct clk *clk; | 80 | struct clk *clk; |
@@ -110,10 +111,9 @@ static struct platform_driver weim_driver = { | |||
110 | .name = "imx-weim", | 111 | .name = "imx-weim", |
111 | .of_match_table = weim_id_table, | 112 | .of_match_table = weim_id_table, |
112 | }, | 113 | }, |
113 | .probe = weim_probe, | ||
114 | }; | 114 | }; |
115 | module_platform_driver_probe(weim_driver, weim_probe); | ||
115 | 116 | ||
116 | module_platform_driver(weim_driver); | ||
117 | MODULE_AUTHOR("Freescale Semiconductor Inc."); | 117 | MODULE_AUTHOR("Freescale Semiconductor Inc."); |
118 | MODULE_DESCRIPTION("i.MX EIM Controller Driver"); | 118 | MODULE_DESCRIPTION("i.MX EIM Controller Driver"); |
119 | MODULE_LICENSE("GPL"); | 119 | MODULE_LICENSE("GPL"); |