aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-05 19:29:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-05 19:29:19 -0400
commitec064d3c6b40697fd72f4b1eeabbf293b7947a04 (patch)
tree1c7dcd0105d2cc9da3861452da9708ca03f2ece6 /include/linux
parentabf7dba7c4f77d781f6df50fefb19a64c5dc331f (diff)
parent8c97a46af04b4f7c0a0dded031fef1806872e648 (diff)
Merge tag 'driver-core-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here is the driver core patchset for 4.18-rc1. The large chunk of these are firmware core documentation and api updates. Nothing major there, just better descriptions for others to be able to understand the firmware code better. There's also a user for a new firmware api call. Other than that, there are some minor updates for debugfs, kernfs, and the driver core itself. All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (23 commits) driver core: hold dev's parent lock when needed driver-core: return EINVAL error instead of BUG_ON() driver core: add __printf verification to device_create_groups_vargs mm: memory_hotplug: use put_device() if device_register fail base: core: fix typo 'can by' to 'can be' debugfs: inode: debugfs_create_dir uses mode permission from parent debugfs: Re-use kstrtobool_from_user() Documentation: clarify firmware_class provenance and why we can't rename the module Documentation: remove stale firmware API reference Documentation: fix few typos and clarifications for the firmware loader ath10k: re-enable the firmware fallback mechanism for testmode ath10k: use firmware_request_nowarn() to load firmware firmware: add firmware_request_nowarn() - load firmware without warnings firmware_loader: make firmware_fallback_sysfs() print more useful firmware_loader: move kconfig FW_LOADER entries to its own file firmware_loader: replace ---help--- with help firmware_loader: enhance Kconfig documentation over FW_LOADER firmware_loader: document firmware_sysfs_fallback() firmware: rename fw_sysfs_fallback to firmware_fallback_sysfs() firmware: use () to terminate kernel-doc function names ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h4
-rw-r--r--include/linux/firmware.h10
2 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 00b6c3b42437..e9d4b43c4ead 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -98,6 +98,8 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
98 * @p: The private data of the driver core, only the driver core can 98 * @p: The private data of the driver core, only the driver core can
99 * touch this. 99 * touch this.
100 * @lock_key: Lock class key for use by the lock validator 100 * @lock_key: Lock class key for use by the lock validator
101 * @need_parent_lock: When probing or removing a device on this bus, the
102 * device core should lock the device's parent.
101 * 103 *
102 * A bus is a channel between the processor and one or more devices. For the 104 * A bus is a channel between the processor and one or more devices. For the
103 * purposes of the device model, all devices are connected via a bus, even if 105 * purposes of the device model, all devices are connected via a bus, even if
@@ -138,6 +140,8 @@ struct bus_type {
138 140
139 struct subsys_private *p; 141 struct subsys_private *p;
140 struct lock_class_key lock_key; 142 struct lock_class_key lock_key;
143
144 bool need_parent_lock;
141}; 145};
142 146
143extern int __must_check bus_register(struct bus_type *bus); 147extern int __must_check bus_register(struct bus_type *bus);
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 41050417cafb..2dd566c91d44 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -42,6 +42,8 @@ struct builtin_fw {
42#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) 42#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
43int request_firmware(const struct firmware **fw, const char *name, 43int request_firmware(const struct firmware **fw, const char *name,
44 struct device *device); 44 struct device *device);
45int firmware_request_nowarn(const struct firmware **fw, const char *name,
46 struct device *device);
45int request_firmware_nowait( 47int request_firmware_nowait(
46 struct module *module, bool uevent, 48 struct module *module, bool uevent,
47 const char *name, struct device *device, gfp_t gfp, void *context, 49 const char *name, struct device *device, gfp_t gfp, void *context,
@@ -59,6 +61,14 @@ static inline int request_firmware(const struct firmware **fw,
59{ 61{
60 return -EINVAL; 62 return -EINVAL;
61} 63}
64
65static inline int firmware_request_nowarn(const struct firmware **fw,
66 const char *name,
67 struct device *device)
68{
69 return -EINVAL;
70}
71
62static inline int request_firmware_nowait( 72static inline int request_firmware_nowait(
63 struct module *module, bool uevent, 73 struct module *module, bool uevent,
64 const char *name, struct device *device, gfp_t gfp, void *context, 74 const char *name, struct device *device, gfp_t gfp, void *context,