diff options
-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) |