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: move devres_for_each_res() to base.h

devres_for_each_res() is only used by .../firmware_loader/main.c, which
already includes base.h.

The usage of devres_for_each_res() by code outside of driver-core is
questionable, hence move it to base.h.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20260119162920.77189-1-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

+4 -4
+4
drivers/base/base.h
··· 213 213 WRITE_ONCE(dev->driver, (struct device_driver *)drv); 214 214 } 215 215 216 + void devres_for_each_res(struct device *dev, dr_release_t release, 217 + dr_match_t match, void *match_data, 218 + void (*fn)(struct device *, void *, void *), 219 + void *data); 216 220 int devres_release_all(struct device *dev); 217 221 void device_block_probing(void); 218 222 void device_unblock_probing(void);
-4
include/linux/device/devres.h
··· 26 26 #define devres_alloc_node(release, size, gfp, nid) \ 27 27 __devres_alloc_node(release, size, gfp, nid, #release) 28 28 29 - void devres_for_each_res(struct device *dev, dr_release_t release, 30 - dr_match_t match, void *match_data, 31 - void (*fn)(struct device *, void *, void *), 32 - void *data); 33 29 void devres_free(void *res); 34 30 void devres_add(struct device *dev, void *res); 35 31 void *devres_find(struct device *dev, dr_release_t release, dr_match_t match, void *match_data);