Skip to content

Commit

Permalink
[PATCH] Add ecard_bus_type probe/remove/shutdown methods
Browse files Browse the repository at this point in the history
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Russell King authored and Greg Kroah-Hartman committed Jan 13, 2006
1 parent b15d686 commit e08b754
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions arch/arm/kernel/ecard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e08b754

Please sign in to comment.