Merge tag 'driver-core-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here are all of the driver core and related patches for 4.19-rc1. Nothing huge here, just a number of small cleanups and the ability to now stop the deferred probing after init happens. All of these have been in linux-next for a while with only a merge issue reported" * tag 'driver-core-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (21 commits) base: core: Remove WARN_ON from link dependencies check drivers/base: stop new probing during shutdown drivers: core: Remove glue dirs from sysfs earlier driver core: remove unnecessary function extern declare sysfs.h: fix non-kernel-doc comment PM / Domains: Stop deferring probe at the end of initcall iommu: Remove IOMMU_OF_DECLARE iommu: Stop deferring probe at end of initcalls pinctrl: Support stopping deferred probe after initcalls dt-bindings: pinctrl: add a 'pinctrl-use-default' property driver core: allow stopping deferred probe after init driver core: add a debugfs entry to show deferred devices sysfs: Fix internal_create_group() for named group updates base: fix order of OF initialization linux/device.h: fix kernel-doc notation warning Documentation: update firmware loader fallback reference kobject: Replace strncpy with memcpy drivers: base: cacheinfo: use OF property_read_u32 instead of get_property,read_number kernfs: Replace strncpy with memcpy device: Add #define dev_fmt similar to #define pr_fmt ...
This commit is contained in:
@@ -339,6 +339,8 @@ struct device *driver_find_device(struct device_driver *drv,
|
||||
struct device *start, void *data,
|
||||
int (*match)(struct device *dev, void *data));
|
||||
|
||||
int driver_deferred_probe_check_state(struct device *dev);
|
||||
|
||||
/**
|
||||
* struct subsys_interface - interfaces to device functions
|
||||
* @name: name of the device function
|
||||
@@ -1329,30 +1331,34 @@ struct device_link *device_link_add(struct device *consumer,
|
||||
void device_link_del(struct device_link *link);
|
||||
void device_link_remove(void *consumer, struct device *supplier);
|
||||
|
||||
#ifndef dev_fmt
|
||||
#define dev_fmt(fmt) fmt
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
|
||||
extern __printf(3, 0)
|
||||
__printf(3, 0)
|
||||
int dev_vprintk_emit(int level, const struct device *dev,
|
||||
const char *fmt, va_list args);
|
||||
extern __printf(3, 4)
|
||||
__printf(3, 4)
|
||||
int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
|
||||
|
||||
extern __printf(3, 4)
|
||||
__printf(3, 4)
|
||||
void dev_printk(const char *level, const struct device *dev,
|
||||
const char *fmt, ...);
|
||||
extern __printf(2, 3)
|
||||
void dev_emerg(const struct device *dev, const char *fmt, ...);
|
||||
extern __printf(2, 3)
|
||||
void dev_alert(const struct device *dev, const char *fmt, ...);
|
||||
extern __printf(2, 3)
|
||||
void dev_crit(const struct device *dev, const char *fmt, ...);
|
||||
extern __printf(2, 3)
|
||||
void dev_err(const struct device *dev, const char *fmt, ...);
|
||||
extern __printf(2, 3)
|
||||
void dev_warn(const struct device *dev, const char *fmt, ...);
|
||||
extern __printf(2, 3)
|
||||
void dev_notice(const struct device *dev, const char *fmt, ...);
|
||||
extern __printf(2, 3)
|
||||
__printf(2, 3)
|
||||
void _dev_emerg(const struct device *dev, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void _dev_alert(const struct device *dev, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void _dev_crit(const struct device *dev, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void _dev_err(const struct device *dev, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void _dev_warn(const struct device *dev, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void _dev_notice(const struct device *dev, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void _dev_info(const struct device *dev, const char *fmt, ...);
|
||||
|
||||
#else
|
||||
@@ -1370,26 +1376,26 @@ static inline void __dev_printk(const char *level, const struct device *dev,
|
||||
{}
|
||||
static inline __printf(3, 4)
|
||||
void dev_printk(const char *level, const struct device *dev,
|
||||
const char *fmt, ...)
|
||||
const char *fmt, ...)
|
||||
{}
|
||||
|
||||
static inline __printf(2, 3)
|
||||
void dev_emerg(const struct device *dev, const char *fmt, ...)
|
||||
void _dev_emerg(const struct device *dev, const char *fmt, ...)
|
||||
{}
|
||||
static inline __printf(2, 3)
|
||||
void dev_crit(const struct device *dev, const char *fmt, ...)
|
||||
void _dev_crit(const struct device *dev, const char *fmt, ...)
|
||||
{}
|
||||
static inline __printf(2, 3)
|
||||
void dev_alert(const struct device *dev, const char *fmt, ...)
|
||||
void _dev_alert(const struct device *dev, const char *fmt, ...)
|
||||
{}
|
||||
static inline __printf(2, 3)
|
||||
void dev_err(const struct device *dev, const char *fmt, ...)
|
||||
void _dev_err(const struct device *dev, const char *fmt, ...)
|
||||
{}
|
||||
static inline __printf(2, 3)
|
||||
void dev_warn(const struct device *dev, const char *fmt, ...)
|
||||
void _dev_warn(const struct device *dev, const char *fmt, ...)
|
||||
{}
|
||||
static inline __printf(2, 3)
|
||||
void dev_notice(const struct device *dev, const char *fmt, ...)
|
||||
void _dev_notice(const struct device *dev, const char *fmt, ...)
|
||||
{}
|
||||
static inline __printf(2, 3)
|
||||
void _dev_info(const struct device *dev, const char *fmt, ...)
|
||||
@@ -1398,27 +1404,36 @@ void _dev_info(const struct device *dev, const char *fmt, ...)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Stupid hackaround for existing uses of non-printk uses dev_info
|
||||
*
|
||||
* Note that the definition of dev_info below is actually _dev_info
|
||||
* and a macro is used to avoid redefining dev_info
|
||||
* #defines for all the dev_<level> macros to prefix with whatever
|
||||
* possible use of #define dev_fmt(fmt) ...
|
||||
*/
|
||||
|
||||
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
|
||||
#define dev_emerg(dev, fmt, ...) \
|
||||
_dev_emerg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#define dev_crit(dev, fmt, ...) \
|
||||
_dev_crit(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#define dev_alert(dev, fmt, ...) \
|
||||
_dev_alert(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#define dev_err(dev, fmt, ...) \
|
||||
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#define dev_warn(dev, fmt, ...) \
|
||||
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#define dev_notice(dev, fmt, ...) \
|
||||
_dev_notice(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#define dev_info(dev, fmt, ...) \
|
||||
_dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#define dev_dbg(dev, format, ...) \
|
||||
do { \
|
||||
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#define dev_dbg(dev, fmt, ...) \
|
||||
dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#elif defined(DEBUG)
|
||||
#define dev_dbg(dev, format, arg...) \
|
||||
dev_printk(KERN_DEBUG, dev, format, ##arg)
|
||||
#define dev_dbg(dev, fmt, ...) \
|
||||
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#else
|
||||
#define dev_dbg(dev, format, arg...) \
|
||||
({ \
|
||||
if (0) \
|
||||
dev_printk(KERN_DEBUG, dev, format, ##arg); \
|
||||
#define dev_dbg(dev, fmt, ...) \
|
||||
({ \
|
||||
if (0) \
|
||||
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
|
||||
})
|
||||
#endif
|
||||
|
||||
@@ -1490,7 +1505,7 @@ do { \
|
||||
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
|
||||
if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
|
||||
__ratelimit(&_rs)) \
|
||||
__dynamic_dev_dbg(&descriptor, dev, fmt, \
|
||||
__dynamic_dev_dbg(&descriptor, dev, dev_fmt(fmt), \
|
||||
##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#elif defined(DEBUG)
|
||||
@@ -1500,23 +1515,23 @@ do { \
|
||||
DEFAULT_RATELIMIT_INTERVAL, \
|
||||
DEFAULT_RATELIMIT_BURST); \
|
||||
if (__ratelimit(&_rs)) \
|
||||
dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
|
||||
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define dev_dbg_ratelimited(dev, fmt, ...) \
|
||||
do { \
|
||||
if (0) \
|
||||
dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
|
||||
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef VERBOSE_DEBUG
|
||||
#define dev_vdbg dev_dbg
|
||||
#else
|
||||
#define dev_vdbg(dev, format, arg...) \
|
||||
({ \
|
||||
if (0) \
|
||||
dev_printk(KERN_DEBUG, dev, format, ##arg); \
|
||||
#define dev_vdbg(dev, fmt, ...) \
|
||||
({ \
|
||||
if (0) \
|
||||
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
|
||||
})
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user