[PATCH net-next 1/2] bng_re: add support for the shutdown callback

Vikas Gupta <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rdma
Message-ID <[email protected]>
From: "Usman S. Ansari" <[email protected]>

At present it calls bng_re_remove(), which adequately handles device
teardown on shutdown. Appropriate shutdown-specific handling will be
introduced in the future.

Signed-off-by: Usman S. Ansari <[email protected]>
Reviewed-by: Siva Reddy Kallam <[email protected]>
Signed-off-by: Vikas Gupta <[email protected]>
---
 drivers/infiniband/hw/bng_re/bng_dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/infiniband/hw/bng_re/bng_dev.c b/drivers/infiniband/hw/bng_re/bng_dev.c
index 311c8bc93160..42b473919d09 100644
--- a/drivers/infiniband/hw/bng_re/bng_dev.c
+++ b/drivers/infiniband/hw/bng_re/bng_dev.c
@@ -477,6 +477,11 @@ static void bng_re_remove(struct auxiliary_device *adev)
 	kfree(dev_info);
 }
 
+static void bng_re_shutdown(struct auxiliary_device *adev)
+{
+	bng_re_remove(adev);
+}
+
 static const struct auxiliary_device_id bng_re_id_table[] = {
 	{ .name = BNG_RE_ADEV_NAME ".rdma", },
 	{},
@@ -488,6 +493,7 @@ static struct auxiliary_driver bng_re_driver = {
 	.name = "rdma",
 	.probe = bng_re_probe,
 	.remove = bng_re_remove,
+	.shutdown = bng_re_shutdown,
 	.id_table = bng_re_id_table,
 };
 
-- 
2.47.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.