aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2006-01-05 09:35:42 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-13 14:26:06 -0500
commitc6a09196bab3bc9e515b713193d61e3e87c720f7 (patch)
tree17636bb7c0c0d9cb01868a2d9bdbd56df25c0855 /arch/sh
parent91fb53866d00b4eaeaf1cbfd2237799cb152f742 (diff)
[PATCH] Add sh_bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/cpu/bus.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/sh/kernel/cpu/bus.c b/arch/sh/kernel/cpu/bus.c
index d4fee2a79373..3278d234bb1b 100644
--- a/arch/sh/kernel/cpu/bus.c
+++ b/arch/sh/kernel/cpu/bus.c
@@ -53,21 +53,6 @@ static int sh_bus_resume(struct device *dev)
53 return 0; 53 return 0;
54} 54}
55 55
56static struct device sh_bus_devices[SH_NR_BUSES] = {
57 {
58 .bus_id = SH_BUS_NAME_VIRT,
59 },
60};
61
62struct bus_type sh_bus_types[SH_NR_BUSES] = {
63 {
64 .name = SH_BUS_NAME_VIRT,
65 .match = sh_bus_match,
66 .suspend = sh_bus_suspend,
67 .resume = sh_bus_resume,
68 },
69};
70
71static int sh_device_probe(struct device *dev) 56static int sh_device_probe(struct device *dev)
72{ 57{
73 struct sh_dev *shdev = to_sh_dev(dev); 58 struct sh_dev *shdev = to_sh_dev(dev);
@@ -90,6 +75,23 @@ static int sh_device_remove(struct device *dev)
90 return 0; 75 return 0;
91} 76}
92 77
78static struct device sh_bus_devices[SH_NR_BUSES] = {
79 {
80 .bus_id = SH_BUS_NAME_VIRT,
81 },
82};
83
84struct bus_type sh_bus_types[SH_NR_BUSES] = {
85 {
86 .name = SH_BUS_NAME_VIRT,
87 .match = sh_bus_match,
88 .probe = sh_bus_probe,
89 .remove = sh_bus_remove,
90 .suspend = sh_bus_suspend,
91 .resume = sh_bus_resume,
92 },
93};
94
93int sh_device_register(struct sh_dev *dev) 95int sh_device_register(struct sh_dev *dev)
94{ 96{
95 if (!dev) 97 if (!dev)
@@ -133,8 +135,6 @@ int sh_driver_register(struct sh_driver *drv)
133 return -EINVAL; 135 return -EINVAL;
134 } 136 }
135 137
136 drv->drv.probe = sh_device_probe;
137 drv->drv.remove = sh_device_remove;
138 drv->drv.bus = &sh_bus_types[drv->bus_id]; 138 drv->drv.bus = &sh_bus_types[drv->bus_id];
139 139
140 return driver_register(&drv->drv); 140 return driver_register(&drv->drv);