summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/ecard.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2006-01-05 15:30:57 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-13 20:26:05 +0100
commite08b754161d6de4f91e2d3c805f350b35a95d8b8 (patch)
tree5a0dad12bed3064416e78f753982d9c7137a36be /arch/arm/kernel/ecard.c
parent[PATCH] Add pci_bus_type probe and remove methods (diff)
downloadlinux-e08b754161d6de4f91e2d3c805f350b35a95d8b8.tar.xz
linux-e08b754161d6de4f91e2d3c805f350b35a95d8b8.zip
[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/arm/kernel/ecard.c')
-rw-r--r--arch/arm/kernel/ecard.c14
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)
struct ecard_driver *drv = ECARD_DRV(dev->driver);
struct ecard_request req;
- if (drv->shutdown)
- drv->shutdown(ec);
- ecard_release(ec);
+ if (dev->driver) {
+ if (drv->shutdown)
+ drv->shutdown(ec);
+ ecard_release(ec);
+ }
/*
* If this card has a loader, call the reset handler.
@@ -1164,9 +1166,6 @@ static void ecard_drv_shutdown(struct device *dev)
int ecard_register_driver(struct ecard_driver *drv)
{
drv->drv.bus = &ecard_bus_type;
- drv->drv.probe = ecard_drv_probe;
- drv->drv.remove = ecard_drv_remove;
- drv->drv.shutdown = ecard_drv_shutdown;
return driver_register(&drv->drv);
}
@@ -1195,6 +1194,9 @@ struct bus_type ecard_bus_type = {
.name = "ecard",
.dev_attrs = ecard_dev_attrs,
.match = ecard_match,
+ .probe = ecard_drv_probe,
+ .remove = ecard_drv_remove,
+ .shutdown = ecard_drv_shutdown,
};
static int ecard_bus_init(void)