Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

driver core: Rename declaration parameter name for API device_find_child() cluster

For APIs:
device_find_child()
device_for_each_child()
device_for_each_child_reverse()

Their declaration has parameter name 'dev', but their defination
changes the name to 'parent'.

Rename declaration name to defination 'parent' to make both have
the same name.

Reviewed-by: Fan Ni <fan.ni@samsung.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250105-class_fix-v6-4-3a2f1768d4d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Zijun Hu and committed by
Greg Kroah-Hartman
ab017a15 3f58ee54

+3 -3
+3 -3
include/linux/device.h
··· 1074 1074 1075 1075 DEFINE_FREE(device_del, struct device *, if (_T) device_del(_T)) 1076 1076 1077 - int device_for_each_child(struct device *dev, void *data, 1077 + int device_for_each_child(struct device *parent, void *data, 1078 1078 int (*fn)(struct device *dev, void *data)); 1079 - int device_for_each_child_reverse(struct device *dev, void *data, 1079 + int device_for_each_child_reverse(struct device *parent, void *data, 1080 1080 int (*fn)(struct device *dev, void *data)); 1081 1081 int device_for_each_child_reverse_from(struct device *parent, 1082 1082 struct device *from, const void *data, 1083 1083 int (*fn)(struct device *, const void *)); 1084 - struct device *device_find_child(struct device *dev, const void *data, 1084 + struct device *device_find_child(struct device *parent, const void *data, 1085 1085 device_match_t match); 1086 1086 struct device *device_find_child_by_name(struct device *parent, 1087 1087 const char *name);