diff options
author | Zijun Hu <quic_zijuhu@quicinc.com> | 2024-12-24 16:05:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-03 13:19:35 +0300 |
commit | e9451ab968bb34f2b37fdd91c376d5f36c4745ee (patch) | |
tree | 955bbc283d00de28b8be94e9a771266c0273dd2f | |
parent | 064aa528bbc5da6530283a761fbb905d52b04916 (diff) | |
download | linux-e9451ab968bb34f2b37fdd91c376d5f36c4745ee.tar.xz |
bus: fsl-mc: Constify fsl_mc_device_match()
fsl_mc_device_match() does not modify caller's inputs.
To prepare for constifying API device_find_child() later.
Constify this comparison function by simply changing its
parameter types to const pointer.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-3-6623037414d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/bus/fsl-mc/dprc-driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c index 4b68c84ef485..11c8fadcf851 100644 --- a/drivers/bus/fsl-mc/dprc-driver.c +++ b/drivers/bus/fsl-mc/dprc-driver.c @@ -22,8 +22,8 @@ struct fsl_mc_child_objs { struct fsl_mc_obj_desc *child_array; }; -static bool fsl_mc_device_match(struct fsl_mc_device *mc_dev, - struct fsl_mc_obj_desc *obj_desc) +static bool fsl_mc_device_match(const struct fsl_mc_device *mc_dev, + 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; |