diff options
author | Russell King <rmk@arm.linux.org.uk> | 2006-01-05 09:30:57 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-13 14:26:05 -0500 |
commit | e08b754161d6de4f91e2d3c805f350b35a95d8b8 (patch) | |
tree | 5a0dad12bed3064416e78f753982d9c7137a36be /arch | |
parent | b15d686a2b589c9e4f1ea116553e9c3c3d030dae (diff) |
[PATCH] Add ecard_bus_type probe/remove/shutdown 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')
-rw-r--r-- | arch/arm/kernel/ecard.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 96fd91926c9b..74ea29c3205e 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -1147,9 +1147,11 @@ static void ecard_drv_shutdown(struct device *dev) | |||
1147 | struct ecard_driver *drv = ECARD_DRV(dev->driver); | 1147 | struct ecard_driver *drv = ECARD_DRV(dev->driver); |
1148 | struct ecard_request req; | 1148 | struct ecard_request req; |
1149 | 1149 | ||
1150 | if (drv->shutdown) | 1150 | if (dev->driver) { |
1151 | drv->shutdown(ec); | 1151 | if (drv->shutdown) |
1152 | ecard_release(ec); | 1152 | drv->shutdown(ec); |
1153 | ecard_release(ec); | ||
1154 | } | ||
1153 | 1155 | ||
1154 | /* | 1156 | /* |
1155 | * If this card has a loader, call the reset handler. | 1157 | * If this card has a loader, call the reset handler. |
@@ -1164,9 +1166,6 @@ static void ecard_drv_shutdown(struct device *dev) | |||
1164 | int ecard_register_driver(struct ecard_driver *drv) | 1166 | int ecard_register_driver(struct ecard_driver *drv) |
1165 | { | 1167 | { |
1166 | drv->drv.bus = &ecard_bus_type; | 1168 | drv->drv.bus = &ecard_bus_type; |
1167 | drv->drv.probe = ecard_drv_probe; | ||
1168 | drv->drv.remove = ecard_drv_remove; | ||
1169 | drv->drv.shutdown = ecard_drv_shutdown; | ||
1170 | 1169 | ||
1171 | return driver_register(&drv->drv); | 1170 | return driver_register(&drv->drv); |
1172 | } | 1171 | } |
@@ -1195,6 +1194,9 @@ struct bus_type ecard_bus_type = { | |||
1195 | .name = "ecard", | 1194 | .name = "ecard", |
1196 | .dev_attrs = ecard_dev_attrs, | 1195 | .dev_attrs = ecard_dev_attrs, |
1197 | .match = ecard_match, | 1196 | .match = ecard_match, |
1197 | .probe = ecard_drv_probe, | ||
1198 | .remove = ecard_drv_remove, | ||
1199 | .shutdown = ecard_drv_shutdown, | ||
1198 | }; | 1200 | }; |
1199 | 1201 | ||
1200 | static int ecard_bus_init(void) | 1202 | static int ecard_bus_init(void) |