From: Umang Jain <umang.jain@ideasonboard.com>
To: linux-staging@lists.linux.dev
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Dan Carpenter <error27@gmail.com>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Phil Elwell <phil@raspberrypi.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Greg KH <greg@kroah.com>,
Umang Jain <umang.jain@ideasonboard.com>
Subject: [PATCH 4/5] staging: vc04_services: Implement vchiq_bus .remove
Date: Fri, 15 Mar 2024 16:26:58 +0530 [thread overview]
Message-ID: <20240315105659.111544-5-umang.jain@ideasonboard.com> (raw)
In-Reply-To: <20240315105659.111544-1-umang.jain@ideasonboard.com>
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>
---
.../vc04_services/interface/vchiq_arm/vchiq_bus.c | 9 +++++++++
1 file changed, 9 insertions(+)
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..d9aa2f41ce13 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,20 @@ 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);
+
+ 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)
--
2.43.0
next prev parent reply other threads:[~2024-03-15 10:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 10:56 [PATCH 0/5] staging: vc04_services: Address module cleanup Umang Jain
2024-03-15 10:56 ` [PATCH 1/5] staging: vc04_services: Remove unused function declarations Umang Jain
2024-03-15 11:00 ` Laurent Pinchart
2024-03-16 10:33 ` Kieran Bingham
2024-03-15 10:56 ` [PATCH 2/5] staging: vc04_services: vchiq_arm: Use appropriate dev_* log helpers Umang Jain
2024-03-16 10:28 ` Kieran Bingham
2024-03-21 12:10 ` Umang Jain
2024-03-15 10:56 ` [PATCH 3/5] staging: vc04_services: Do not log error on kzalloc() Umang Jain
2024-03-16 8:36 ` Dan Carpenter
2024-03-15 10:56 ` Umang Jain [this message]
2024-03-16 10:30 ` [PATCH 4/5] staging: vc04_services: Implement vchiq_bus .remove Kieran Bingham
2024-03-15 10:56 ` [PATCH 5/5] staging: vc04_services: vchiq_core: Stop kthreads on shutdown Umang Jain
2024-03-16 10:33 ` Kieran Bingham
2024-03-17 12:08 ` [PATCH 0/5] staging: vc04_services: Address module cleanup Stefan Wahren
2024-03-21 11:30 ` Umang Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240315105659.111544-5-umang.jain@ideasonboard.com \
--to=umang.jain@ideasonboard.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=error27@gmail.com \
--cc=greg@kroah.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-staging@lists.linux.dev \
--cc=phil@raspberrypi.com \
--cc=stefan.wahren@i2se.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox