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

driver core: Move dev_err_probe() to where it belogs

dev_err_probe() belongs to the printing API, hence
move the definition from device.h to dev_printk.h.

There is no change to the callers at all, since:
1) implementation is located in the same core.c;
2) dev_printk.h is guaranteed to be included by device.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20230721131309.16821-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
9e0cace7 f5992717

+2 -2
+2
include/linux/dev_printk.h
··· 274 274 WARN_ONCE(condition, "%s %s: " format, \ 275 275 dev_driver_string(dev), dev_name(dev), ## arg) 276 276 277 + __printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...); 278 + 277 279 #endif /* _DEVICE_PRINTK_H_ */
-2
include/linux/device.h
··· 1215 1215 void device_links_supplier_sync_state_pause(void); 1216 1216 void device_links_supplier_sync_state_resume(void); 1217 1217 1218 - __printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...); 1219 - 1220 1218 /* Create alias, so I can be autoloaded. */ 1221 1219 #define MODULE_ALIAS_CHARDEV(major,minor) \ 1222 1220 MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))