[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240811-const_dfc_done-v1-17-9d85e3f943cb@quicinc.com>
Date: Sun, 11 Aug 2024 10:25:08 +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 17/27] bus: fsl-mc: 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
__fsl_mc_device_match() as its match function take a const pointer.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
drivers/bus/fsl-mc/dprc-driver.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c
index 4b68c84ef485..a3dfaa508724 100644
--- a/drivers/bus/fsl-mc/dprc-driver.c
+++ b/drivers/bus/fsl-mc/dprc-driver.c
@@ -23,10 +23,10 @@ struct fsl_mc_child_objs {
};
static bool fsl_mc_device_match(struct fsl_mc_device *mc_dev,
- struct fsl_mc_obj_desc *obj_desc)
+ const struct fsl_mc_obj_desc *obj_desc)
{
return mc_dev->obj_desc.id == obj_desc->id &&
- strcmp(mc_dev->obj_desc.type, obj_desc->type) == 0;
+ strcmp(mc_dev->obj_desc.type, obj_desc->type) == 0;
}
static bool fsl_mc_obj_desc_is_allocatable(struct fsl_mc_obj_desc *obj)
@@ -112,9 +112,9 @@ void dprc_remove_devices(struct fsl_mc_device *mc_bus_dev,
}
EXPORT_SYMBOL_GPL(dprc_remove_devices);
-static int __fsl_mc_device_match(struct device *dev, void *data)
+static int __fsl_mc_device_match(struct device *dev, const void *data)
{
- struct fsl_mc_obj_desc *obj_desc = data;
+ const struct fsl_mc_obj_desc *obj_desc = data;
struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
return fsl_mc_device_match(mc_dev, obj_desc);
--
2.34.1
Powered by blists - more mailing lists