Merge tag 'driver-core-4.15-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 / debugfs patches for 4.15-rc1. Not many here, mostly all are debugfs fixes to resolve some long-reported problems with files going away with references to them in userspace. There's also some SPDX cleanups for the debugfs code, as well as a few other minor driver core changes for issues reported by people. All of these have been in linux-next for a week or more with no reported issues" * tag 'driver-core-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Fix device link deferred probe debugfs: Remove redundant license text debugfs: add SPDX identifiers to all debugfs files debugfs: defer debugfs_fsdata allocation to first usage debugfs: call debugfs_real_fops() only after debugfs_file_get() debugfs: purge obsolete SRCU based removal protection IB/hfi1: convert to debugfs_file_get() and -put() debugfs: convert to debugfs_file_get() and -put() debugfs: debugfs_real_fops(): drop __must_hold sparse annotation debugfs: implement per-file removal protection debugfs: add support for more elaborate ->d_fsdata driver core: Move device_links_purge() after bus_remove_device() arch_topology: Fix section miss match warning due to free_raw_capacity() driver-core: pr_err() strings should end with newlines
This commit is contained in:
@@ -105,7 +105,7 @@ subsys_initcall(register_cpu_capacity_sysctl);
|
||||
static u32 capacity_scale;
|
||||
static u32 *raw_capacity;
|
||||
|
||||
static int __init free_raw_capacity(void)
|
||||
static int free_raw_capacity(void)
|
||||
{
|
||||
kfree(raw_capacity);
|
||||
raw_capacity = NULL;
|
||||
|
@@ -1958,7 +1958,6 @@ void device_del(struct device *dev)
|
||||
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
|
||||
BUS_NOTIFY_DEL_DEVICE, dev);
|
||||
|
||||
device_links_purge(dev);
|
||||
dpm_sysfs_remove(dev);
|
||||
if (parent)
|
||||
klist_del(&dev->p->knode_parent);
|
||||
@@ -1986,6 +1985,7 @@ void device_del(struct device *dev)
|
||||
device_pm_remove(dev);
|
||||
driver_deferred_probe_del(dev);
|
||||
device_remove_properties(dev);
|
||||
device_links_purge(dev);
|
||||
|
||||
/* Notify the platform of the removal, in case they
|
||||
* need to do anything...
|
||||
|
@@ -350,6 +350,15 @@ EXPORT_SYMBOL_GPL(device_bind_driver);
|
||||
static atomic_t probe_count = ATOMIC_INIT(0);
|
||||
static DECLARE_WAIT_QUEUE_HEAD(probe_waitqueue);
|
||||
|
||||
static void driver_deferred_probe_add_trigger(struct device *dev,
|
||||
int local_trigger_count)
|
||||
{
|
||||
driver_deferred_probe_add(dev);
|
||||
/* Did a trigger occur while probing? Need to re-trigger if yes */
|
||||
if (local_trigger_count != atomic_read(&deferred_trigger_count))
|
||||
driver_deferred_probe_trigger();
|
||||
}
|
||||
|
||||
static int really_probe(struct device *dev, struct device_driver *drv)
|
||||
{
|
||||
int ret = -EPROBE_DEFER;
|
||||
@@ -369,6 +378,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
|
||||
}
|
||||
|
||||
ret = device_links_check_suppliers(dev);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
driver_deferred_probe_add_trigger(dev, local_trigger_count);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -470,10 +481,7 @@ pinctrl_bind_failed:
|
||||
case -EPROBE_DEFER:
|
||||
/* Driver requested deferred probing */
|
||||
dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
|
||||
driver_deferred_probe_add(dev);
|
||||
/* Did a trigger occur while probing? Need to re-trigger if yes */
|
||||
if (local_trigger_count != atomic_read(&deferred_trigger_count))
|
||||
driver_deferred_probe_trigger();
|
||||
driver_deferred_probe_add_trigger(dev, local_trigger_count);
|
||||
break;
|
||||
case -ENODEV:
|
||||
case -ENXIO:
|
||||
|
@@ -64,7 +64,7 @@ static int __init test_async_probe_init(void)
|
||||
NULL, 0);
|
||||
if (IS_ERR(async_dev_1)) {
|
||||
error = PTR_ERR(async_dev_1);
|
||||
pr_err("failed to create async_dev_1: %d", error);
|
||||
pr_err("failed to create async_dev_1: %d\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ static int __init test_async_probe_init(void)
|
||||
NULL, 0);
|
||||
if (IS_ERR(async_dev_2)) {
|
||||
error = PTR_ERR(async_dev_2);
|
||||
pr_err("failed to create async_dev_2: %d", error);
|
||||
pr_err("failed to create async_dev_2: %d\n", error);
|
||||
goto err_unregister_async_driver;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ static int __init test_async_probe_init(void)
|
||||
NULL, 0);
|
||||
if (IS_ERR(sync_dev_1)) {
|
||||
error = PTR_ERR(sync_dev_1);
|
||||
pr_err("failed to create sync_dev_1: %d", error);
|
||||
pr_err("failed to create sync_dev_1: %d\n", error);
|
||||
goto err_unregister_sync_driver;
|
||||
}
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user