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"
Unified · Split
| @@ -4,7 +4,7 @@ Required properties: · 3 unmodified lines | ||
| 4 | 4 | - compatible: Should be one of the following. |
| 5 | 5 | - "rockchip,rk3066a-efuse" - for RK3066a SoCs. |
| 6 | 6 | - "rockchip,rk3188-efuse" - for RK3188 SoCs. |
| 7 | − - "rockchip,rk322x-efuse" - for RK322x SoCs. | |
| 7 | + - "rockchip,rk3228-efuse" - for RK3228 SoCs. | |
| 8 | 8 | - "rockchip,rk3288-efuse" - for RK3288 SoCs. |
| 9 | 9 | - "rockchip,rk3399-efuse" - for RK3399 SoCs. |
| 10 | 10 | - reg: Should contain the registers location and exact eFuse size |
| @@ -12356,6 +12356,15 @@ S: Supported · 12355 unmodified lines | ||
| 12356 | 12356 | F: Documentation/networking/spider_net.txt |
| 12357 | 12357 | F: drivers/net/ethernet/toshiba/spider_net* |
| 12358 | 12358 | |
| 12359 | +SPMI SUBSYSTEM | |
| 12360 | +R: Stephen Boyd <sboyd@codeaurora.org> | |
| 12361 | +L: linux-arm-msm@vger.kernel.org | |
| 12362 | +F: Documentation/devicetree/bindings/spmi/ | |
| 12363 | +F: drivers/spmi/ | |
| 12364 | +F: include/dt-bindings/spmi/spmi.h | |
| 12365 | +F: include/linux/spmi.h | |
| 12366 | +F: include/trace/events/spmi.h | |
| 12367 | + | |
| 12359 | 12368 | SPU FILE SYSTEM |
| 12360 | 12369 | M: Jeremy Kerr <jk@ozlabs.org> |
| 12361 | 12370 | L: linuxppc-dev@lists.ozlabs.org |
| @@ -2200,8 +2200,12 @@ static void binder_transaction(struct binder_proc *proc, · 2199 unmodified lines | ||
| 2200 | 2200 | list_add_tail(&t->work.entry, target_list); |
| 2201 | 2201 | tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE; |
| 2202 | 2202 | list_add_tail(&tcomplete->entry, &thread->todo); |
| 2203 | − if (target_wait) | |
| 2204 | − wake_up_interruptible(target_wait); | |
| 2203 | + if (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 | 2209 | return; |
| 2206 | 2210 | |
| 2207 | 2211 | err_translate_failed: |
| @@ -3247,10 +3251,6 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) · 1039 unmodified lines | ||
| 3247 | 3251 | /*pr_info("binder_ioctl: %d:%d %x %lx\n", |
| 3248 | 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 | 3254 | trace_binder_ioctl(cmd, arg); |
| 3255 | 3255 | |
| 3256 | 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) · 207 unmodified lines | ||
| 3464 | 3464 | proc = kzalloc(sizeof(*proc), GFP_KERNEL); |
| 3465 | 3465 | if (proc == NULL) |
| 3466 | 3466 | return -ENOMEM; |
| 3467 | − get_task_struct(current); | |
| 3468 | − proc->tsk = current; | |
| 3469 | − proc->vma_vm_mm = current->mm; | |
| 3467 | + get_task_struct(current->group_leader); | |
| 3468 | + proc->tsk = current->group_leader; | |
| 3470 | 3469 | INIT_LIST_HEAD(&proc->todo); |
| 3471 | 3470 | init_waitqueue_head(&proc->wait); |
| 3472 | 3471 | proc->default_priority = task_nice(current); |
| @@ -532,7 +532,7 @@ static inline uint32_t fsi_smode_sid(int x) · 531 unmodified lines | ||
| 532 | 532 | return (x & FSI_SMODE_SID_MASK) << FSI_SMODE_SID_SHIFT; |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | −static const uint32_t fsi_slave_smode(int id) | |
| 535 | +static uint32_t fsi_slave_smode(int id) | |
| 536 | 536 | { |
| 537 | 537 | return FSI_SMODE_WSC | FSI_SMODE_ECRC |
| 538 | 538 | | fsi_smode_sid(id) |
| @@ -883,17 +883,16 @@ struct bus_type fsi_bus_type = { · 344 unmodified lines | ||
| 883 | 883 | }; |
| 884 | 884 | EXPORT_SYMBOL_GPL(fsi_bus_type); |
| 885 | 885 | |
| 886 | −static int fsi_init(void) | |
| 886 | +static int __init fsi_init(void) | |
| 887 | 887 | { |
| 888 | 888 | return bus_register(&fsi_bus_type); |
| 889 | 889 | } |
| 890 | +postcore_initcall(fsi_init); | |
| 890 | 891 | |
| 891 | 892 | static void fsi_exit(void) |
| 892 | 893 | { |
| 893 | 894 | bus_unregister(&fsi_bus_type); |
| 894 | 895 | } |
| 895 | − | |
| 896 | −module_init(fsi_init); | |
| 897 | 896 | module_exit(fsi_exit); |
| 898 | 897 | module_param(discard_errors, int, 0664); |
| 899 | 898 | MODULE_LICENSE("GPL"); |
| @@ -606,6 +606,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel) · 605 unmodified lines | ||
| 606 | 606 | get_order(channel->ringbuffer_pagecount * PAGE_SIZE)); |
| 607 | 607 | |
| 608 | 608 | out: |
| 609 | + /* re-enable tasklet for use on re-open */ | |
| 610 | + tasklet_enable(&channel->callback_event); | |
| 609 | 611 | return ret; |
| 610 | 612 | } |
| 611 | 613 | |
| @@ -2,20 +2,11 @@ · 1 unmodified line | ||
| 2 | 2 | # Multiplexer devices |
| 3 | 3 | # |
| 4 | 4 | |
| 5 | −menuconfig MULTIPLEXER | |
| 6 | − tristate "Multiplexer subsystem" | |
| 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. | |
| 5 | +config MULTIPLEXER | |
| 6 | + tristate | |
| 17 | 7 | |
| 18 | −if MULTIPLEXER | |
| 8 | +menu "Multiplexer drivers" | |
| 9 | + depends on MULTIPLEXER | |
| 19 | 10 | |
| 20 | 11 | config MUX_ADG792A |
| 21 | 12 | tristate "Analog Devices ADG792A/ADG792G Multiplexers" |
| @@ -56,4 +47,4 @@ config MUX_MMIO · 34 unmodified lines | ||
| 56 | 47 | To compile the driver as a module, choose M here: the module will |
| 57 | 48 | be called mux-mmio. |
| 58 | 49 | |
| 59 | −endif | |
| 50 | +endmenu | |
| @@ -46,7 +46,7 @@ static int __init mux_init(void) · 45 unmodified lines | ||
| 46 | 46 | |
| 47 | 47 | static void __exit mux_exit(void) |
| 48 | 48 | { |
| 49 | − class_register(&mux_class); | |
| 49 | + class_unregister(&mux_class); | |
| 50 | 50 | ida_destroy(&mux_ida); |
| 51 | 51 | } |
| 52 | 52 | |
| @@ -170,7 +170,7 @@ static const struct of_device_id rockchip_efuse_match[] = { · 169 unmodified lines | ||
| 170 | 170 | .data = (void *)&rockchip_rk3288_efuse_read, |
| 171 | 171 | }, |
| 172 | 172 | { |
| 173 | − .compatible = "rockchip,rk322x-efuse", | |
| 173 | + .compatible = "rockchip,rk3228-efuse", | |
| 174 | 174 | .data = (void *)&rockchip_rk3288_efuse_read, |
| 175 | 175 | }, |
| 176 | 176 | { |
| @@ -134,7 +134,6 @@ struct apid_data { · 133 unmodified lines | ||
| 134 | 134 | * @spmic: SPMI controller object |
| 135 | 135 | * @ver_ops: version dependent operations. |
| 136 | 136 | * @ppid_to_apid in-memory copy of PPID -> channel (APID) mapping table. |
| 137 | − * v2 only. | |
| 138 | 137 | */ |
| 139 | 138 | struct spmi_pmic_arb { |
| 140 | 139 | void __iomem *rd_base; |
| @@ -1016,6 +1015,13 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) · 875 unmodified lines | ||
| 1016 | 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 | 1025 | hw_ver = readl_relaxed(core + PMIC_ARB_VERSION); |
| 1020 | 1026 | |
| 1021 | 1027 | if (hw_ver < PMIC_ARB_VERSION_V2_MIN) { |
| @@ -1048,15 +1054,6 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) · 26 unmodified lines | ||
| 1048 | 1054 | err = PTR_ERR(pa->wr_base); |
| 1049 | 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 | 1059 | dev_info(&ctrl->dev, "PMIC arbiter version %s (0x%x)\n", |
| @@ -365,11 +365,23 @@ static int spmi_drv_remove(struct device *dev) · 364 unmodified lines | ||
| 365 | 365 | return 0; |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | +static 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 | + | |
| 368 | 379 | static struct bus_type spmi_bus_type = { |
| 369 | 380 | .name = "spmi", |
| 370 | 381 | .match = spmi_device_match, |
| 371 | 382 | .probe = spmi_drv_probe, |
| 372 | 383 | .remove = spmi_drv_remove, |
| 384 | + .uevent = spmi_drv_uevent, | |
| 373 | 385 | }; |
| 374 | 386 | |
| 375 | 387 | /** |
| @@ -281,9 +281,11 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id, · 280 unmodified lines | ||
| 281 | 281 | if (active) { |
| 282 | 282 | config.name = "nvm_active"; |
| 283 | 283 | config.reg_read = tb_switch_nvm_read; |
| 284 | + config.read_only = true; | |
| 284 | 285 | } else { |
| 285 | 286 | config.name = "nvm_non_active"; |
| 286 | 287 | config.reg_write = tb_switch_nvm_write; |
| 288 | + config.root_only = true; | |
| 287 | 289 | } |
| 288 | 290 | |
| 289 | 291 | config.id = id; |
| @@ -292,7 +294,6 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id, · 2 unmodified lines | ||
| 292 | 294 | config.size = size; |
| 293 | 295 | config.dev = &sw->dev; |
| 294 | 296 | config.owner = THIS_MODULE; |
| 295 | − config.root_only = true; | |
| 296 | 297 | config.priv = sw; |
| 297 | 298 | |
| 298 | 299 | return nvmem_register(&config); |
| @@ -704,7 +704,8 @@ static int omap_hdq_probe(struct platform_device *pdev) · 703 unmodified lines | ||
| 704 | 704 | |
| 705 | 705 | irq = platform_get_irq(pdev, 0); |
| 706 | 706 | if (irq < 0) { |
| 707 | − ret = -ENXIO; | |
| 707 | + dev_dbg(&pdev->dev, "Failed to get IRQ: %d\n", irq); | |
| 708 | + ret = irq; | |
| 708 | 709 | goto err_irq; |
| 709 | 710 | } |
| 710 | 711 | |
| @@ -728,6 +728,7 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) · 727 unmodified lines | ||
| 728 | 728 | memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); |
| 729 | 729 | atomic_set(&sl->refcnt, 1); |
| 730 | 730 | atomic_inc(&sl->master->refcnt); |
| 731 | + dev->slave_count++; | |
| 731 | 732 | |
| 732 | 733 | /* slave modules need to be loaded in a context with unlocked mutex */ |
| 733 | 734 | mutex_unlock(&dev->mutex); |
| @@ -747,11 +748,11 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) · 13 unmodified lines | ||
| 747 | 748 | |
| 748 | 749 | sl->family = f; |
| 749 | 750 | |
| 750 | − | |
| 751 | 751 | err = __w1_attach_slave_device(sl); |
| 752 | 752 | if (err < 0) { |
| 753 | 753 | dev_err(&dev->dev, "%s: Attaching %s failed.\n", __func__, |
| 754 | 754 | sl->name); |
| 755 | + dev->slave_count--; | |
| 755 | 756 | w1_family_put(sl->family); |
| 756 | 757 | atomic_dec(&sl->master->refcnt); |
| 757 | 758 | kfree(sl); |
| @@ -759,7 +760,6 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) · 1 unmodified line | ||
| 759 | 760 | } |
| 760 | 761 | |
| 761 | 762 | sl->ttl = dev->slave_ttl; |
| 762 | − dev->slave_count++; | |
| 763 | 763 | |
| 764 | 764 | memcpy(msg.id.id, rn, sizeof(msg.id)); |
| 765 | 765 | msg.type = W1_SLAVE_ADD; |