aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-22 11:57:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-22 11:57:24 -0400
commitdedaff2f6d0dd1e88022da6aaa3dbc97f7b5cf8b (patch)
tree774b9d5fe9398e7deca930ff979346f6a150c9fd /drivers
parent55fd939e8ee4538c3b66a28975dcc3beb96f80ba (diff)
parentc89876dda01841a6a485cb29b9d1843db34958a3 (diff)
Merge tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for 4.13-rc2. All fix reported problems with 4.13-rc1 or older kernels (like the binder fixes). Full details in the shortlog. All have been in linux-next with no reported issues" * tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: w1: omap-hdq: fix error return code in omap_hdq_probe() regmap: regmap-w1: Fix build troubles w1: Fix slave count on 1-Wire bus (resend) mux: mux-core: unregister mux_class in mux_exit() mux: remove the Kconfig question for the subsystem nvmem: rockchip-efuse: amend compatible rk322x-efuse to rk3228-efuse drivers/fsi: fix fsi_slave_mode prototype fsi: core: register with postcore_initcall thunderbolt: Correct access permissions for active NVM contents vmbus: re-enable channel tasklet spmi: pmic-arb: Always allocate ppid_to_apid table MAINTAINERS: Add entry for SPMI subsystem spmi: Include OF based modalias in device uevent binder: Use wake up hint for synchronous transactions. binder: use group leader instead of open thread Revert "android: binder: Sanity check at binder ioctl"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/android/binder.c17
-rw-r--r--drivers/fsi/fsi-core.c7
-rw-r--r--drivers/hv/channel.c2
-rw-r--r--drivers/mux/Kconfig19
-rw-r--r--drivers/mux/mux-core.c2
-rw-r--r--drivers/nvmem/rockchip-efuse.c2
-rw-r--r--drivers/spmi/spmi-pmic-arb.c17
-rw-r--r--drivers/spmi/spmi.c12
-rw-r--r--drivers/thunderbolt/switch.c3
-rw-r--r--drivers/w1/masters/omap_hdq.c3
-rw-r--r--drivers/w1/w1.c4
11 files changed, 45 insertions, 43 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index aae4d8d4be36..f7665c31feca 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2200,8 +2200,12 @@ static void binder_transaction(struct binder_proc *proc,
2200 list_add_tail(&t->work.entry, target_list); 2200 list_add_tail(&t->work.entry, target_list);
2201 tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE; 2201 tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE;
2202 list_add_tail(&tcomplete->entry, &thread->todo); 2202 list_add_tail(&tcomplete->entry, &thread->todo);
2203 if (target_wait) 2203 if (target_wait) {
2204 wake_up_interruptible(target_wait); 2204 if (reply || !(t->flags & TF_ONE_WAY))
2205 wake_up_interruptible_sync(target_wait);
2206 else
2207 wake_up_interruptible(target_wait);
2208 }
2205 return; 2209 return;
2206 2210
2207err_translate_failed: 2211err_translate_failed:
@@ -3247,10 +3251,6 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
3247 /*pr_info("binder_ioctl: %d:%d %x %lx\n", 3251 /*pr_info("binder_ioctl: %d:%d %x %lx\n",
3248 proc->pid, current->pid, cmd, arg);*/ 3252 proc->pid, current->pid, cmd, arg);*/
3249 3253
3250 if (unlikely(current->mm != proc->vma_vm_mm)) {
3251 pr_err("current mm mismatch proc mm\n");
3252 return -EINVAL;
3253 }
3254 trace_binder_ioctl(cmd, arg); 3254 trace_binder_ioctl(cmd, arg);
3255 3255
3256 ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); 3256 ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2);
@@ -3464,9 +3464,8 @@ static int binder_open(struct inode *nodp, struct file *filp)
3464 proc = kzalloc(sizeof(*proc), GFP_KERNEL); 3464 proc = kzalloc(sizeof(*proc), GFP_KERNEL);
3465 if (proc == NULL) 3465 if (proc == NULL)
3466 return -ENOMEM; 3466 return -ENOMEM;
3467 get_task_struct(current); 3467 get_task_struct(current->group_leader);
3468 proc->tsk = current; 3468 proc->tsk = current->group_leader;
3469 proc->vma_vm_mm = current->mm;
3470 INIT_LIST_HEAD(&proc->todo); 3469 INIT_LIST_HEAD(&proc->todo);
3471 init_waitqueue_head(&proc->wait); 3470 init_waitqueue_head(&proc->wait);
3472 proc->default_priority = task_nice(current); 3471 proc->default_priority = task_nice(current);
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
index a485864cb512..06432d84cbf8 100644
--- a/drivers/fsi/fsi-core.c
+++ b/drivers/fsi/fsi-core.c
@@ -532,7 +532,7 @@ static inline uint32_t fsi_smode_sid(int x)
532 return (x & FSI_SMODE_SID_MASK) << FSI_SMODE_SID_SHIFT; 532 return (x & FSI_SMODE_SID_MASK) << FSI_SMODE_SID_SHIFT;
533} 533}
534 534
535static const uint32_t fsi_slave_smode(int id) 535static uint32_t fsi_slave_smode(int id)
536{ 536{
537 return FSI_SMODE_WSC | FSI_SMODE_ECRC 537 return FSI_SMODE_WSC | FSI_SMODE_ECRC
538 | fsi_smode_sid(id) 538 | fsi_smode_sid(id)
@@ -883,17 +883,16 @@ struct bus_type fsi_bus_type = {
883}; 883};
884EXPORT_SYMBOL_GPL(fsi_bus_type); 884EXPORT_SYMBOL_GPL(fsi_bus_type);
885 885
886static int fsi_init(void) 886static int __init fsi_init(void)
887{ 887{
888 return bus_register(&fsi_bus_type); 888 return bus_register(&fsi_bus_type);
889} 889}
890postcore_initcall(fsi_init);
890 891
891static void fsi_exit(void) 892static void fsi_exit(void)
892{ 893{
893 bus_unregister(&fsi_bus_type); 894 bus_unregister(&fsi_bus_type);
894} 895}
895
896module_init(fsi_init);
897module_exit(fsi_exit); 896module_exit(fsi_exit);
898module_param(discard_errors, int, 0664); 897module_param(discard_errors, int, 0664);
899MODULE_LICENSE("GPL"); 898MODULE_LICENSE("GPL");
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index e9bf0bb87ac4..e57cc40cb768 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -606,6 +606,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel)
606 get_order(channel->ringbuffer_pagecount * PAGE_SIZE)); 606 get_order(channel->ringbuffer_pagecount * PAGE_SIZE));
607 607
608out: 608out:
609 /* re-enable tasklet for use on re-open */
610 tasklet_enable(&channel->callback_event);
609 return ret; 611 return ret;
610} 612}
611 613
diff --git a/drivers/mux/Kconfig b/drivers/mux/Kconfig
index 7c754a0f14bb..19e4e904c9bf 100644
--- a/drivers/mux/Kconfig
+++ b/drivers/mux/Kconfig
@@ -2,20 +2,11 @@
2# Multiplexer devices 2# Multiplexer devices
3# 3#
4 4
5menuconfig MULTIPLEXER 5config MULTIPLEXER
6 tristate "Multiplexer subsystem" 6 tristate
7 help
8 Multiplexer controller subsystem. Multiplexers are used in a
9 variety of settings, and this subsystem abstracts their use
10 so that the rest of the kernel sees a common interface. When
11 multiple parallel multiplexers are controlled by one single
12 multiplexer controller, this subsystem also coordinates the
13 multiplexer accesses.
14
15 To compile the subsystem as a module, choose M here: the module will
16 be called mux-core.
17 7
18if MULTIPLEXER 8menu "Multiplexer drivers"
9 depends on MULTIPLEXER
19 10
20config MUX_ADG792A 11config MUX_ADG792A
21 tristate "Analog Devices ADG792A/ADG792G Multiplexers" 12 tristate "Analog Devices ADG792A/ADG792G Multiplexers"
@@ -56,4 +47,4 @@ config MUX_MMIO
56 To compile the driver as a module, choose M here: the module will 47 To compile the driver as a module, choose M here: the module will
57 be called mux-mmio. 48 be called mux-mmio.
58 49
59endif 50endmenu
diff --git a/drivers/mux/mux-core.c b/drivers/mux/mux-core.c
index 90b8995f07cb..2fe96c470112 100644
--- a/drivers/mux/mux-core.c
+++ b/drivers/mux/mux-core.c
@@ -46,7 +46,7 @@ static int __init mux_init(void)
46 46
47static void __exit mux_exit(void) 47static void __exit mux_exit(void)
48{ 48{
49 class_register(&mux_class); 49 class_unregister(&mux_class);
50 ida_destroy(&mux_ida); 50 ida_destroy(&mux_ida);
51} 51}
52 52
diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index a0d4ede9b8fc..63e3eb55f3ac 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -170,7 +170,7 @@ static const struct of_device_id rockchip_efuse_match[] = {
170 .data = (void *)&rockchip_rk3288_efuse_read, 170 .data = (void *)&rockchip_rk3288_efuse_read,
171 }, 171 },
172 { 172 {
173 .compatible = "rockchip,rk322x-efuse", 173 .compatible = "rockchip,rk3228-efuse",
174 .data = (void *)&rockchip_rk3288_efuse_read, 174 .data = (void *)&rockchip_rk3288_efuse_read,
175 }, 175 },
176 { 176 {
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 2afe3597982e..f4b7a98a7913 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -134,7 +134,6 @@ struct apid_data {
134 * @spmic: SPMI controller object 134 * @spmic: SPMI controller object
135 * @ver_ops: version dependent operations. 135 * @ver_ops: version dependent operations.
136 * @ppid_to_apid in-memory copy of PPID -> channel (APID) mapping table. 136 * @ppid_to_apid in-memory copy of PPID -> channel (APID) mapping table.
137 * v2 only.
138 */ 137 */
139struct spmi_pmic_arb { 138struct spmi_pmic_arb {
140 void __iomem *rd_base; 139 void __iomem *rd_base;
@@ -1016,6 +1015,13 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev)
1016 goto err_put_ctrl; 1015 goto err_put_ctrl;
1017 } 1016 }
1018 1017
1018 pa->ppid_to_apid = devm_kcalloc(&ctrl->dev, PMIC_ARB_MAX_PPID,
1019 sizeof(*pa->ppid_to_apid), GFP_KERNEL);
1020 if (!pa->ppid_to_apid) {
1021 err = -ENOMEM;
1022 goto err_put_ctrl;
1023 }
1024
1019 hw_ver = readl_relaxed(core + PMIC_ARB_VERSION); 1025 hw_ver = readl_relaxed(core + PMIC_ARB_VERSION);
1020 1026
1021 if (hw_ver < PMIC_ARB_VERSION_V2_MIN) { 1027 if (hw_ver < PMIC_ARB_VERSION_V2_MIN) {
@@ -1048,15 +1054,6 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev)
1048 err = PTR_ERR(pa->wr_base); 1054 err = PTR_ERR(pa->wr_base);
1049 goto err_put_ctrl; 1055 goto err_put_ctrl;
1050 } 1056 }
1051
1052 pa->ppid_to_apid = devm_kcalloc(&ctrl->dev,
1053 PMIC_ARB_MAX_PPID,
1054 sizeof(*pa->ppid_to_apid),
1055 GFP_KERNEL);
1056 if (!pa->ppid_to_apid) {
1057 err = -ENOMEM;
1058 goto err_put_ctrl;
1059 }
1060 } 1057 }
1061 1058
1062 dev_info(&ctrl->dev, "PMIC arbiter version %s (0x%x)\n", 1059 dev_info(&ctrl->dev, "PMIC arbiter version %s (0x%x)\n",
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index 2b9b0941d9eb..6d23226e5f69 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -365,11 +365,23 @@ static int spmi_drv_remove(struct device *dev)
365 return 0; 365 return 0;
366} 366}
367 367
368static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env)
369{
370 int ret;
371
372 ret = of_device_uevent_modalias(dev, env);
373 if (ret != -ENODEV)
374 return ret;
375
376 return 0;
377}
378
368static struct bus_type spmi_bus_type = { 379static struct bus_type spmi_bus_type = {
369 .name = "spmi", 380 .name = "spmi",
370 .match = spmi_device_match, 381 .match = spmi_device_match,
371 .probe = spmi_drv_probe, 382 .probe = spmi_drv_probe,
372 .remove = spmi_drv_remove, 383 .remove = spmi_drv_remove,
384 .uevent = spmi_drv_uevent,
373}; 385};
374 386
375/** 387/**
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index ab3e8f410444..40219a706309 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -281,9 +281,11 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id,
281 if (active) { 281 if (active) {
282 config.name = "nvm_active"; 282 config.name = "nvm_active";
283 config.reg_read = tb_switch_nvm_read; 283 config.reg_read = tb_switch_nvm_read;
284 config.read_only = true;
284 } else { 285 } else {
285 config.name = "nvm_non_active"; 286 config.name = "nvm_non_active";
286 config.reg_write = tb_switch_nvm_write; 287 config.reg_write = tb_switch_nvm_write;
288 config.root_only = true;
287 } 289 }
288 290
289 config.id = id; 291 config.id = id;
@@ -292,7 +294,6 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id,
292 config.size = size; 294 config.size = size;
293 config.dev = &sw->dev; 295 config.dev = &sw->dev;
294 config.owner = THIS_MODULE; 296 config.owner = THIS_MODULE;
295 config.root_only = true;
296 config.priv = sw; 297 config.priv = sw;
297 298
298 return nvmem_register(&config); 299 return nvmem_register(&config);
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 3612542b6044..83fc9aab34e8 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -704,7 +704,8 @@ static int omap_hdq_probe(struct platform_device *pdev)
704 704
705 irq = platform_get_irq(pdev, 0); 705 irq = platform_get_irq(pdev, 0);
706 if (irq < 0) { 706 if (irq < 0) {
707 ret = -ENXIO; 707 dev_dbg(&pdev->dev, "Failed to get IRQ: %d\n", irq);
708 ret = irq;
708 goto err_irq; 709 goto err_irq;
709 } 710 }
710 711
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 95ea7e6b1d99..74471e7aa5cc 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -728,6 +728,7 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
728 memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); 728 memcpy(&sl->reg_num, rn, sizeof(sl->reg_num));
729 atomic_set(&sl->refcnt, 1); 729 atomic_set(&sl->refcnt, 1);
730 atomic_inc(&sl->master->refcnt); 730 atomic_inc(&sl->master->refcnt);
731 dev->slave_count++;
731 732
732 /* slave modules need to be loaded in a context with unlocked mutex */ 733 /* slave modules need to be loaded in a context with unlocked mutex */
733 mutex_unlock(&dev->mutex); 734 mutex_unlock(&dev->mutex);
@@ -747,11 +748,11 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
747 748
748 sl->family = f; 749 sl->family = f;
749 750
750
751 err = __w1_attach_slave_device(sl); 751 err = __w1_attach_slave_device(sl);
752 if (err < 0) { 752 if (err < 0) {
753 dev_err(&dev->dev, "%s: Attaching %s failed.\n", __func__, 753 dev_err(&dev->dev, "%s: Attaching %s failed.\n", __func__,
754 sl->name); 754 sl->name);
755 dev->slave_count--;
755 w1_family_put(sl->family); 756 w1_family_put(sl->family);
756 atomic_dec(&sl->master->refcnt); 757 atomic_dec(&sl->master->refcnt);
757 kfree(sl); 758 kfree(sl);
@@ -759,7 +760,6 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
759 } 760 }
760 761
761 sl->ttl = dev->slave_ttl; 762 sl->ttl = dev->slave_ttl;
762 dev->slave_count++;
763 763
764 memcpy(msg.id.id, rn, sizeof(msg.id)); 764 memcpy(msg.id.id, rn, sizeof(msg.id));
765 msg.type = W1_SLAVE_ADD; 765 msg.type = W1_SLAVE_ADD;