diff options
author | Umang Jain <umang.jain@ideasonboard.com> | 2024-03-21 16:07:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-25 21:09:19 +0300 |
commit | bf1894900b53f9047eb9b96c89717a9a22329f6a (patch) | |
tree | 8651a9a7358adde29720f37a1b0f4e9e6b0cf37c /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c | |
parent | ff6643de78d12d9174d574b25794f8ab4b8c5ac6 (diff) | |
download | linux-bf1894900b53f9047eb9b96c89717a9a22329f6a.tar.xz |
staging: vc04_services: Implement vchiq_bus .remove
Implement the struct vchiq_bus .remove() so that cleanup
paths can be executed by the devices registered to this
bus, when being removed.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Link: https://lore.kernel.org/r/20240321130737.898154-5-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c index 68f830d75531..93609716df84 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c @@ -37,11 +37,21 @@ static int vchiq_bus_probe(struct device *dev) return driver->probe(device); } +static void vchiq_bus_remove(struct device *dev) +{ + struct vchiq_device *device = to_vchiq_device(dev); + struct vchiq_driver *driver = to_vchiq_driver(dev->driver); + + if (driver->remove) + driver->remove(device); +} + const struct bus_type vchiq_bus_type = { .name = "vchiq-bus", .match = vchiq_bus_type_match, .uevent = vchiq_bus_uevent, .probe = vchiq_bus_probe, + .remove = vchiq_bus_remove, }; static void vchiq_device_release(struct device *dev) |