diff options
-rw-r--r-- | arch/arm/mach-integrator/lm.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-integrator/lm.c index 5b41e3a724e1..622cdc4212dd 100644 --- a/arch/arm/mach-integrator/lm.c +++ b/arch/arm/mach-integrator/lm.c | |||
@@ -22,20 +22,6 @@ static int lm_match(struct device *dev, struct device_driver *drv) | |||
22 | return 1; | 22 | return 1; |
23 | } | 23 | } |
24 | 24 | ||
25 | static struct bus_type lm_bustype = { | ||
26 | .name = "logicmodule", | ||
27 | .match = lm_match, | ||
28 | // .suspend = lm_suspend, | ||
29 | // .resume = lm_resume, | ||
30 | }; | ||
31 | |||
32 | static int __init lm_init(void) | ||
33 | { | ||
34 | return bus_register(&lm_bustype); | ||
35 | } | ||
36 | |||
37 | postcore_initcall(lm_init); | ||
38 | |||
39 | static int lm_bus_probe(struct device *dev) | 25 | static int lm_bus_probe(struct device *dev) |
40 | { | 26 | { |
41 | struct lm_device *lmdev = to_lm_device(dev); | 27 | struct lm_device *lmdev = to_lm_device(dev); |
@@ -49,16 +35,30 @@ static int lm_bus_remove(struct device *dev) | |||
49 | struct lm_device *lmdev = to_lm_device(dev); | 35 | struct lm_device *lmdev = to_lm_device(dev); |
50 | struct lm_driver *lmdrv = to_lm_driver(dev->driver); | 36 | struct lm_driver *lmdrv = to_lm_driver(dev->driver); |
51 | 37 | ||
52 | lmdrv->remove(lmdev); | 38 | if (lmdrv->remove) |
39 | lmdrv->remove(lmdev); | ||
53 | return 0; | 40 | return 0; |
54 | } | 41 | } |
55 | 42 | ||
43 | static struct bus_type lm_bustype = { | ||
44 | .name = "logicmodule", | ||
45 | .match = lm_match, | ||
46 | .probe = lm_bus_probe, | ||
47 | .remove = lm_bus_remove, | ||
48 | // .suspend = lm_bus_suspend, | ||
49 | // .resume = lm_bus_resume, | ||
50 | }; | ||
51 | |||
52 | static int __init lm_init(void) | ||
53 | { | ||
54 | return bus_register(&lm_bustype); | ||
55 | } | ||
56 | |||
57 | postcore_initcall(lm_init); | ||
58 | |||
56 | int lm_driver_register(struct lm_driver *drv) | 59 | int lm_driver_register(struct lm_driver *drv) |
57 | { | 60 | { |
58 | drv->drv.bus = &lm_bustype; | 61 | drv->drv.bus = &lm_bustype; |
59 | drv->drv.probe = lm_bus_probe; | ||
60 | drv->drv.remove = lm_bus_remove; | ||
61 | |||
62 | return driver_register(&drv->drv); | 62 | return driver_register(&drv->drv); |
63 | } | 63 | } |
64 | 64 | ||