aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/ap_bus.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2021-04-16 12:46:27 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-06-07 17:06:59 +0200
commit95c09f0344f1dd9206f105b211c36476a7301b07 (patch)
treeb774523620098353da5ad24b5da877939d0b4146 /drivers/s390/crypto/ap_bus.c
parents390/zcrypt: remove zcrypt_device_count (diff)
downloadlinux-dev-95c09f0344f1dd9206f105b211c36476a7301b07.tar.xz
linux-dev-95c09f0344f1dd9206f105b211c36476a7301b07.zip
s390/ap: wire up bus->probe and bus->remove
Hijacking the device_driver's probe/remove callbacks for purely bus-internal logic is a very unconvential construct. Instead just set up our callbacks in the AP bus struct, and really_probe() will call them in the same way as before. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to '')
-rw-r--r--drivers/s390/crypto/ap_bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 2758d05a802d..868ff02e92e7 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -885,8 +885,6 @@ int ap_driver_register(struct ap_driver *ap_drv, struct module *owner,
struct device_driver *drv = &ap_drv->driver;
drv->bus = &ap_bus_type;
- drv->probe = ap_device_probe;
- drv->remove = ap_device_remove;
drv->owner = owner;
drv->name = name;
return driver_register(drv);
@@ -1319,6 +1317,8 @@ static struct bus_type ap_bus_type = {
.bus_groups = ap_bus_groups,
.match = &ap_bus_match,
.uevent = &ap_uevent,
+ .probe = ap_device_probe,
+ .remove = ap_device_remove,
};
/**