1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/rpmsg
Zijun Hu f1e8bf5632 driver core: Constify API device_find_child() and adapt for various usages
Constify the following API:
struct device *device_find_child(struct device *dev, void *data,
		int (*match)(struct device *dev, void *data));
To :
struct device *device_find_child(struct device *dev, const void *data,
                                 device_match_t match);
typedef int (*device_match_t)(struct device *dev, const void *data);
with the following reasons:

- Protect caller's match data @*data which is for comparison and lookup
  and the API does not actually need to modify @*data.

- Make the API's parameters (@match)() and @data have the same type as
  all of other device finding APIs (bus|class|driver)_find_device().

- All kinds of existing device match functions can be directly taken
  as the API's argument, they were exported by driver core.

Constify the API and adapt for various existing usages.

BTW, various subsystem changes are squashed into this commit to meet
'git bisect' requirement, and this commit has the minimal and simplest
changes to complement squashing shortcoming, and that may bring extra
code improvement.

Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Uwe Kleine-König <ukleinek@kernel.org> # for drivers/pwm
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-4-6623037414d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-03 11:19:35 +01:00
..
Kconfig rpmsg: Move the rpmsg control device from rpmsg_char to rpmsg_ctrl 2022-03-13 11:49:53 -05:00
Makefile rpmsg: glink: Introduce packet tracepoints 2024-08-12 15:26:28 -07:00
mtk_rpmsg.c rpmsg: mtk_rpmsg: Fix circular locking dependency 2022-06-14 16:41:10 -06:00
qcom_glink_native.c rpmsg updates for v6.13 2024-11-26 18:36:55 -08:00
qcom_glink_native.h rpmsg: glink: Fix spelling of peek 2023-02-14 20:28:48 -08:00
qcom_glink_rpm.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
qcom_glink_smem.c rpmsg: glink: Fix spelling of peek 2023-02-14 20:28:48 -08:00
qcom_glink_ssr.c rpmsg: qcom_glink_ssr: fix module autoloading 2024-05-06 19:26:28 -07:00
qcom_glink_trace.h rpmsg: glink: Introduce packet tracepoints 2024-08-12 15:26:28 -07:00
qcom_smd.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
rpmsg_char.c rpmsg: char: add missing MODULE_DESCRIPTION() macro 2024-06-10 11:11:59 -06:00
rpmsg_char.h rpmsg: char: Export eptdev create and destroy functions 2022-03-13 11:49:53 -05:00
rpmsg_core.c driver core: Constify API device_find_child() and adapt for various usages 2025-01-03 11:19:35 +01:00
rpmsg_ctrl.c rpmsg: core: Make rpmsg_class constant 2024-03-26 11:25:13 -06:00
rpmsg_internal.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
rpmsg_ns.c rpmsg: Replace deprecated strncpy with strscpy_pad 2023-10-23 11:57:57 -06:00
virtio_rpmsg_bus.c virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00