Merge tag 'driver-core-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here is the set of driver core patches for 5.8-rc1. Not all that huge this release, just a number of small fixes and updates: - software node fixes - kobject now sends KOBJ_REMOVE when it is removed from sysfs, not when it is removed from memory (which could come much later) - device link additions and fixes based on testing on more devices - firmware core cleanups - other minor changes, full details in the shortlog All have been in linux-next for a while with no reported issues" * tag 'driver-core-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (23 commits) driver core: Update device link status correctly for SYNC_STATE_ONLY links firmware_loader: change enum fw_opt to u32 software node: implement software_node_unregister() kobject: send KOBJ_REMOVE uevent when the object is removed from sysfs driver core: Remove unnecessary is_fwnode_dev variable in device_add() drivers property: When no children in primary, try secondary driver core: platform: Fix spelling errors in platform.c driver core: Remove check in driver_deferred_probe_force_trigger() of: platform: Batch fwnode parsing when adding all top level devices driver core: fw_devlink: Add support for batching fwnode parsing driver core: Look for waiting consumers only for a fwnode's primary device driver core: Move code to the right part of the file Revert "Revert "driver core: Set fw_devlink to "permissive" behavior by default"" drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish firmware_loader: move fw_fallback_config to a private kernel symbol namespace driver core: Add missing '\n' in log messages driver/base/soc: Use kobj_to_dev() API Add documentation on meaning of -EPROBE_DEFER driver core: platform: remove redundant assignment to variable ret debugfs: Use the correct style for SPDX License Identifier ...
This commit is contained in:
@@ -620,6 +620,13 @@ void kobject_del(struct kobject *kobj)
|
||||
if (ktype)
|
||||
sysfs_remove_groups(kobj, ktype->default_groups);
|
||||
|
||||
/* send "remove" if the caller did not do it but sent "add" */
|
||||
if (kobj->state_add_uevent_sent && !kobj->state_remove_uevent_sent) {
|
||||
pr_debug("kobject: '%s' (%p): auto cleanup 'remove' event\n",
|
||||
kobject_name(kobj), kobj);
|
||||
kobject_uevent(kobj, KOBJ_REMOVE);
|
||||
}
|
||||
|
||||
sysfs_remove_dir(kobj);
|
||||
sysfs_put(sd);
|
||||
|
||||
@@ -673,13 +680,6 @@ static void kobject_cleanup(struct kobject *kobj)
|
||||
pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed. See Documentation/core-api/kobject.rst.\n",
|
||||
kobject_name(kobj), kobj);
|
||||
|
||||
/* send "remove" if the caller did not do it but sent "add" */
|
||||
if (kobj->state_add_uevent_sent && !kobj->state_remove_uevent_sent) {
|
||||
pr_debug("kobject: '%s' (%p): auto cleanup 'remove' event\n",
|
||||
kobject_name(kobj), kobj);
|
||||
kobject_uevent(kobj, KOBJ_REMOVE);
|
||||
}
|
||||
|
||||
/* remove from sysfs if the caller did not do it */
|
||||
if (kobj->state_in_sysfs) {
|
||||
pr_debug("kobject: '%s' (%p): auto cleanup kobject_del\n",
|
||||
|
@@ -310,27 +310,13 @@ static int test_dev_config_update_bool(const char *buf, size_t size,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
test_dev_config_show_bool(char *buf,
|
||||
bool config)
|
||||
static ssize_t test_dev_config_show_bool(char *buf, bool val)
|
||||
{
|
||||
bool val;
|
||||
|
||||
mutex_lock(&test_fw_mutex);
|
||||
val = config;
|
||||
mutex_unlock(&test_fw_mutex);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", val);
|
||||
}
|
||||
|
||||
static ssize_t test_dev_config_show_int(char *buf, int cfg)
|
||||
static ssize_t test_dev_config_show_int(char *buf, int val)
|
||||
{
|
||||
int val;
|
||||
|
||||
mutex_lock(&test_fw_mutex);
|
||||
val = cfg;
|
||||
mutex_unlock(&test_fw_mutex);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", val);
|
||||
}
|
||||
|
||||
@@ -354,14 +340,8 @@ static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg)
|
||||
return size;
|
||||
}
|
||||
|
||||
static ssize_t test_dev_config_show_u8(char *buf, u8 cfg)
|
||||
static ssize_t test_dev_config_show_u8(char *buf, u8 val)
|
||||
{
|
||||
u8 val;
|
||||
|
||||
mutex_lock(&test_fw_mutex);
|
||||
val = cfg;
|
||||
mutex_unlock(&test_fw_mutex);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", val);
|
||||
}
|
||||
|
||||
|
@@ -644,7 +644,9 @@ static void __init fwnode_pointer(void)
|
||||
test(second_name, "%pfwP", software_node_fwnode(&softnodes[1]));
|
||||
test(third_name, "%pfwP", software_node_fwnode(&softnodes[2]));
|
||||
|
||||
software_node_unregister_nodes(softnodes);
|
||||
software_node_unregister(&softnodes[2]);
|
||||
software_node_unregister(&softnodes[1]);
|
||||
software_node_unregister(&softnodes[0]);
|
||||
}
|
||||
|
||||
static void __init
|
||||
|
Reference in New Issue
Block a user