[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240811-const_dfc_done-v1-18-9d85e3f943cb@quicinc.com>
Date: Sun, 11 Aug 2024 10:25:09 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Cc: Zijun Hu <zijun_hu@...oud.com>, linux-kernel@...r.kernel.org,
Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH 18/27] block: sunvdc: Make device_find_child()'s match
function take a const pointer
From: Zijun Hu <quic_zijuhu@...cinc.com>
In order to adapt for constified device_find_child(), make
vdc_device_probed() as its match function take a const pointer.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
drivers/block/sunvdc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 2d38331ee667..5e0759c8d459 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -918,16 +918,16 @@ struct vdc_check_port_data {
char *type;
};
-static int vdc_device_probed(struct device *dev, void *arg)
+static int vdc_device_probed(struct device *dev, const void *arg)
{
struct vio_dev *vdev = to_vio_dev(dev);
- struct vdc_check_port_data *port_data;
+ const struct vdc_check_port_data *port_data;
- port_data = (struct vdc_check_port_data *)arg;
+ port_data = (const struct vdc_check_port_data *)arg;
if ((vdev->dev_no == port_data->dev_no) &&
(!(strcmp((char *)&vdev->type, port_data->type))) &&
- dev_get_drvdata(dev)) {
+ dev_get_drvdata(dev)) {
/* This device has already been configured
* by vdc_port_probe()
*/
--
2.34.1
Powered by blists - more mailing lists