]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 22 Jul 2017 15:57:24 +0000 (08:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 22 Jul 2017 15:57:24 +0000 (08:57 -0700)
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"

13 files changed:
Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt
MAINTAINERS
drivers/android/binder.c
drivers/fsi/fsi-core.c
drivers/hv/channel.c
drivers/mux/Kconfig
drivers/mux/mux-core.c
drivers/nvmem/rockchip-efuse.c
drivers/spmi/spmi-pmic-arb.c
drivers/spmi/spmi.c
drivers/thunderbolt/switch.c
drivers/w1/masters/omap_hdq.c
drivers/w1/w1.c

index 194926f77194c4d3fea8e73942bd1f20ae361815..1ff02afdc55a8afab456daa3b17dce7c2a97263c 100644 (file)
@@ -4,7 +4,7 @@ Required properties:
 - compatible: Should be one of the following.
   - "rockchip,rk3066a-efuse" - for RK3066a SoCs.
   - "rockchip,rk3188-efuse" - for RK3188 SoCs.
-  - "rockchip,rk322x-efuse" - for RK322x SoCs.
+  - "rockchip,rk3228-efuse" - for RK3228 SoCs.
   - "rockchip,rk3288-efuse" - for RK3288 SoCs.
   - "rockchip,rk3399-efuse" - for RK3399 SoCs.
 - reg: Should contain the registers location and exact eFuse size
index 2bc366472169788ae51f0314b4283a6f1fec454c..8a266f41e11184a6efb758e41c72b0fd355f5702 100644 (file)
@@ -12356,6 +12356,15 @@ S:     Supported
 F:     Documentation/networking/spider_net.txt
 F:     drivers/net/ethernet/toshiba/spider_net*
 
+SPMI SUBSYSTEM
+R:     Stephen Boyd <sboyd@codeaurora.org>
+L:     linux-arm-msm@vger.kernel.org
+F:     Documentation/devicetree/bindings/spmi/
+F:     drivers/spmi/
+F:     include/dt-bindings/spmi/spmi.h
+F:     include/linux/spmi.h
+F:     include/trace/events/spmi.h
+
 SPU FILE SYSTEM
 M:     Jeremy Kerr <jk@ozlabs.org>
 L:     linuxppc-dev@lists.ozlabs.org
index aae4d8d4be361b6a38195f165c630e74cefdfdd6..f7665c31fecaf3f46b64e17a821f9b8528def937 100644 (file)
@@ -2200,8 +2200,12 @@ static void binder_transaction(struct binder_proc *proc,
        list_add_tail(&t->work.entry, target_list);
        tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE;
        list_add_tail(&tcomplete->entry, &thread->todo);
-       if (target_wait)
-               wake_up_interruptible(target_wait);
+       if (target_wait) {
+               if (reply || !(t->flags & TF_ONE_WAY))
+                       wake_up_interruptible_sync(target_wait);
+               else
+                       wake_up_interruptible(target_wait);
+       }
        return;
 
 err_translate_failed:
@@ -3247,10 +3251,6 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
        /*pr_info("binder_ioctl: %d:%d %x %lx\n",
                        proc->pid, current->pid, cmd, arg);*/
 
-       if (unlikely(current->mm != proc->vma_vm_mm)) {
-               pr_err("current mm mismatch proc mm\n");
-               return -EINVAL;
-       }
        trace_binder_ioctl(cmd, arg);
 
        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)
        proc = kzalloc(sizeof(*proc), GFP_KERNEL);
        if (proc == NULL)
                return -ENOMEM;
-       get_task_struct(current);
-       proc->tsk = current;
-       proc->vma_vm_mm = current->mm;
+       get_task_struct(current->group_leader);
+       proc->tsk = current->group_leader;
        INIT_LIST_HEAD(&proc->todo);
        init_waitqueue_head(&proc->wait);
        proc->default_priority = task_nice(current);
index a485864cb5125cd5612656e8064d62cc9408249a..06432d84cbf8c58215fdd7e1fcd07ab85926ad91 100644 (file)
@@ -532,7 +532,7 @@ static inline uint32_t fsi_smode_sid(int x)
        return (x & FSI_SMODE_SID_MASK) << FSI_SMODE_SID_SHIFT;
 }
 
-static const uint32_t fsi_slave_smode(int id)
+static uint32_t fsi_slave_smode(int id)
 {
        return FSI_SMODE_WSC | FSI_SMODE_ECRC
                | fsi_smode_sid(id)
@@ -883,17 +883,16 @@ struct bus_type fsi_bus_type = {
 };
 EXPORT_SYMBOL_GPL(fsi_bus_type);
 
-static int fsi_init(void)
+static int __init fsi_init(void)
 {
        return bus_register(&fsi_bus_type);
 }
+postcore_initcall(fsi_init);
 
 static void fsi_exit(void)
 {
        bus_unregister(&fsi_bus_type);
 }
-
-module_init(fsi_init);
 module_exit(fsi_exit);
 module_param(discard_errors, int, 0664);
 MODULE_LICENSE("GPL");
index e9bf0bb87ac40c7e610aa28ac23d35dcc3991ba2..e57cc40cb768b7d3b85c761700e3729c2a2deebc 100644 (file)
@@ -606,6 +606,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel)
                get_order(channel->ringbuffer_pagecount * PAGE_SIZE));
 
 out:
+       /* re-enable tasklet for use on re-open */
+       tasklet_enable(&channel->callback_event);
        return ret;
 }
 
index 7c754a0f14bb5327b6e590ae6f31755a3762034a..19e4e904c9bfcf5bb1ccdfba3faf2b60ced9e7e5 100644 (file)
@@ -2,20 +2,11 @@
 # Multiplexer devices
 #
 
-menuconfig MULTIPLEXER
-       tristate "Multiplexer subsystem"
-       help
-         Multiplexer controller subsystem. Multiplexers are used in a
-         variety of settings, and this subsystem abstracts their use
-         so that the rest of the kernel sees a common interface. When
-         multiple parallel multiplexers are controlled by one single
-         multiplexer controller, this subsystem also coordinates the
-         multiplexer accesses.
-
-         To compile the subsystem as a module, choose M here: the module will
-         be called mux-core.
+config MULTIPLEXER
+       tristate
 
-if MULTIPLEXER
+menu "Multiplexer drivers"
+       depends on MULTIPLEXER
 
 config MUX_ADG792A
        tristate "Analog Devices ADG792A/ADG792G Multiplexers"
@@ -56,4 +47,4 @@ config MUX_MMIO
          To compile the driver as a module, choose M here: the module will
          be called mux-mmio.
 
-endif
+endmenu
index 90b8995f07cba08ad9c0dfb241916da10eac7fcf..2fe96c4701126300dc36adfe43801ec2fe81465f 100644 (file)
@@ -46,7 +46,7 @@ static int __init mux_init(void)
 
 static void __exit mux_exit(void)
 {
-       class_register(&mux_class);
+       class_unregister(&mux_class);
        ida_destroy(&mux_ida);
 }
 
index a0d4ede9b8fc4aae1fdedbd901376a8c06972c0b..63e3eb55f3ac62e0784b21005d3f41c3a1b544b7 100644 (file)
@@ -170,7 +170,7 @@ static const struct of_device_id rockchip_efuse_match[] = {
                .data = (void *)&rockchip_rk3288_efuse_read,
        },
        {
-               .compatible = "rockchip,rk322x-efuse",
+               .compatible = "rockchip,rk3228-efuse",
                .data = (void *)&rockchip_rk3288_efuse_read,
        },
        {
index 2afe3597982e73f5b592be8f7d991c4ebef9f8ad..f4b7a98a7913e236e295d4dd3422fa0f218b6e53 100644 (file)
@@ -134,7 +134,6 @@ struct apid_data {
  * @spmic:             SPMI controller object
  * @ver_ops:           version dependent operations.
  * @ppid_to_apid       in-memory copy of PPID -> channel (APID) mapping table.
- *                     v2 only.
  */
 struct spmi_pmic_arb {
        void __iomem            *rd_base;
@@ -1016,6 +1015,13 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev)
                goto err_put_ctrl;
        }
 
+       pa->ppid_to_apid = devm_kcalloc(&ctrl->dev, PMIC_ARB_MAX_PPID,
+                                       sizeof(*pa->ppid_to_apid), GFP_KERNEL);
+       if (!pa->ppid_to_apid) {
+               err = -ENOMEM;
+               goto err_put_ctrl;
+       }
+
        hw_ver = readl_relaxed(core + PMIC_ARB_VERSION);
 
        if (hw_ver < PMIC_ARB_VERSION_V2_MIN) {
@@ -1048,15 +1054,6 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev)
                        err = PTR_ERR(pa->wr_base);
                        goto err_put_ctrl;
                }
-
-               pa->ppid_to_apid = devm_kcalloc(&ctrl->dev,
-                                               PMIC_ARB_MAX_PPID,
-                                               sizeof(*pa->ppid_to_apid),
-                                               GFP_KERNEL);
-               if (!pa->ppid_to_apid) {
-                       err = -ENOMEM;
-                       goto err_put_ctrl;
-               }
        }
 
        dev_info(&ctrl->dev, "PMIC arbiter version %s (0x%x)\n",
index 2b9b0941d9eb5f82e917978426290a9d39b5c5cd..6d23226e5f696ee2268073efbe899bdfea88ba8a 100644 (file)
@@ -365,11 +365,23 @@ static int spmi_drv_remove(struct device *dev)
        return 0;
 }
 
+static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env)
+{
+       int ret;
+
+       ret = of_device_uevent_modalias(dev, env);
+       if (ret != -ENODEV)
+               return ret;
+
+       return 0;
+}
+
 static struct bus_type spmi_bus_type = {
        .name           = "spmi",
        .match          = spmi_device_match,
        .probe          = spmi_drv_probe,
        .remove         = spmi_drv_remove,
+       .uevent         = spmi_drv_uevent,
 };
 
 /**
index ab3e8f410444498c49d0c43c86c93d12fc016cbf..40219a7063099674f1e7144cfb32d5753138f7ce 100644 (file)
@@ -281,9 +281,11 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id,
        if (active) {
                config.name = "nvm_active";
                config.reg_read = tb_switch_nvm_read;
+               config.read_only = true;
        } else {
                config.name = "nvm_non_active";
                config.reg_write = tb_switch_nvm_write;
+               config.root_only = true;
        }
 
        config.id = id;
@@ -292,7 +294,6 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id,
        config.size = size;
        config.dev = &sw->dev;
        config.owner = THIS_MODULE;
-       config.root_only = true;
        config.priv = sw;
 
        return nvmem_register(&config);
index 3612542b604444bbfdf30a2212e45e830eb5e9d3..83fc9aab34e872377274c3521055365fc618bef4 100644 (file)
@@ -704,7 +704,8 @@ static int omap_hdq_probe(struct platform_device *pdev)
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
-               ret = -ENXIO;
+               dev_dbg(&pdev->dev, "Failed to get IRQ: %d\n", irq);
+               ret = irq;
                goto err_irq;
        }
 
index 95ea7e6b1d991b681579477653e173fd2412a4b0..74471e7aa5cc42d82305967bc5a1795363fb5895 100644 (file)
@@ -728,6 +728,7 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
        memcpy(&sl->reg_num, rn, sizeof(sl->reg_num));
        atomic_set(&sl->refcnt, 1);
        atomic_inc(&sl->master->refcnt);
+       dev->slave_count++;
 
        /* slave modules need to be loaded in a context with unlocked mutex */
        mutex_unlock(&dev->mutex);
@@ -747,11 +748,11 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
 
        sl->family = f;
 
-
        err = __w1_attach_slave_device(sl);
        if (err < 0) {
                dev_err(&dev->dev, "%s: Attaching %s failed.\n", __func__,
                         sl->name);
+               dev->slave_count--;
                w1_family_put(sl->family);
                atomic_dec(&sl->master->refcnt);
                kfree(sl);
@@ -759,7 +760,6 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
        }
 
        sl->ttl = dev->slave_ttl;
-       dev->slave_count++;
 
        memcpy(msg.id.id, rn, sizeof(msg.id));
        msg.type = W1_SLAVE_ADD;