diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2016-10-05 16:23:28 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-10-05 16:23:28 -0300 |
commit | a7f858238e7c8e8c4b9040aac0eb28bb0b6ab9dc (patch) | |
tree | f87a76eb101d6b9ea2016c404982991345d95dc8 /drivers/base | |
parent | 5bc73053cc0a6a0e5c5f953f8b774854316b87a9 (diff) | |
parent | 04cb720142764ebf3786eba1feb8fc4b6ef87fcf (diff) |
Merge tag 'v4.1.33' into 4.1-2.0.x-imx
Linux 4.1.33
* tag 'v4.1.33': (1760 commits)
Linux 4.1.33
Revert "ARC: mm: don't loose PTE_SPECIAL in pte_modify()"
x86/AMD: Apply erratum 665 on machines without a BIOS fix
x86/paravirt: Do not trace _paravirt_ident_*() functions
ovl: listxattr: use strnlen()
ovl: remove posix_acl_default from workdir
serial: 8250: added acces i/o products quad and octal serial cards
sysfs: correctly handle read offset on PREALLOC attrs
sysfs: correctly handle short reads on PREALLOC attrs.
kernfs: don't depend on d_find_any_alias() when generating notifications
dm crypt: fix free of bad values after tfm allocation failure
dm crypt: fix error with too large bios
dm log writes: fix check of kthread_run() return value
dm log writes: fix bug with too large bios
dm log writes: move IO accounting earlier to fix error path
NFSv4.x: Fix a refcount leak in nfs_callback_up_net
xfs: prevent dropping ioend completions during buftarg wait
xfs: fix superblock inprogress check
USB: serial: option: add WeTelecom 0x6802 and 0x6803 products
USB: avoid left shift by -1
...
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/module.c | 8 | ||||
-rw-r--r-- | drivers/base/power/main.c | 5 | ||||
-rw-r--r-- | drivers/base/power/runtime.c | 9 | ||||
-rw-r--r-- | drivers/base/regmap/regmap-spmi.c | 2 |
4 files changed, 16 insertions, 8 deletions
diff --git a/drivers/base/module.c b/drivers/base/module.c index db930d3ee312..2a215780eda2 100644 --- a/drivers/base/module.c +++ b/drivers/base/module.c @@ -24,10 +24,12 @@ static char *make_driver_name(struct device_driver *drv) static void module_create_drivers_dir(struct module_kobject *mk) { - if (!mk || mk->drivers_dir) - return; + static DEFINE_MUTEX(drivers_dir_mutex); - mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); + mutex_lock(&drivers_dir_mutex); + if (mk && !mk->drivers_dir) + mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); + mutex_unlock(&drivers_dir_mutex); } void module_add_driver(struct module *mod, struct device_driver *drv) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 3d874eca7104..9f198da6b19f 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -1259,14 +1259,15 @@ int dpm_suspend_late(pm_message_t state) error = device_suspend_late(dev); mutex_lock(&dpm_list_mtx); + if (!list_empty(&dev->power.entry)) + list_move(&dev->power.entry, &dpm_late_early_list); + if (error) { pm_dev_err(dev, state, " late", error); dpm_save_failed_dev(dev_name(dev)); put_device(dev); break; } - if (!list_empty(&dev->power.entry)) - list_move(&dev->power.entry, &dpm_late_early_list); put_device(dev); if (async_error) diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 5070c4fe8542..5b06452e2af2 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -1462,11 +1462,16 @@ int pm_runtime_force_resume(struct device *dev) goto out; } - ret = callback(dev); + ret = pm_runtime_set_active(dev); if (ret) goto out; - pm_runtime_set_active(dev); + ret = callback(dev); + if (ret) { + pm_runtime_set_suspended(dev); + goto out; + } + pm_runtime_mark_last_busy(dev); out: pm_runtime_enable(dev); diff --git a/drivers/base/regmap/regmap-spmi.c b/drivers/base/regmap/regmap-spmi.c index d7026dc33388..b394aaef3867 100644 --- a/drivers/base/regmap/regmap-spmi.c +++ b/drivers/base/regmap/regmap-spmi.c @@ -153,7 +153,7 @@ static int regmap_spmi_ext_read(void *context, while (val_size) { len = min_t(size_t, val_size, 8); - err = spmi_ext_register_readl(context, addr, val, val_size); + err = spmi_ext_register_readl(context, addr, val, len); if (err) goto err_out; |