1. 28 4月, 2013 7 次提交
  2. 27 4月, 2013 1 次提交
  3. 26 4月, 2013 17 次提交
    • A
      regulator: ab3100: Fix regulator register error handling · 018fd856
      Axel Lin 提交于
      Ensure to unregister all regulators before return error in probe().
      
      The regulator register order depends on the regulator ID pass to
      ab3100_regulator_register() function. Thus we need to scan ab3100_regulator_desc
      and find the index of successfully registered regulators, or alternatively just
      call ab3100_regulators_remove() to unregister all registered regulators.
      
      Since current code uses a static ab3100_regulators table, explicitly set
      reg->rdev = NULL after regulator_unregister() call to ensure calling
      ab3100_regulators_remove() in the unwind path always work.
      
      Also move ab3100_regulators_remove() to avoid forward declaration.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      018fd856
    • A
      regulator: tps6524x: Use regulator_map_voltage_ascend · b92f567d
      Axel Lin 提交于
      All regulators have ascendant voltage list in this driver.
      Use regulator_map_voltage_ascend for them.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      b92f567d
    • M
      efivars: only check for duplicates on the registered list · f464246d
      Matt Fleming 提交于
      variable_is_present() accesses '__efivars' directly, but when called via
      gsmi_init() Michel reports observing the following crash,
      
        BUG: unable to handle kernel NULL pointer dereference at (null)
        IP: variable_is_present+0x55/0x170
        Call Trace:
          register_efivars+0x106/0x370
          gsmi_init+0x2ad/0x3da
          do_one_initcall+0x3f/0x170
      
      The reason for the crash is that '__efivars' hasn't been initialised nor
      has it been registered with register_efivars() by the time the google
      EFI SMI driver runs.  The gsmi code uses its own struct efivars, and
      therefore, a different variable list.  Fix the above crash by passing
      the registered struct efivars to variable_is_present(), so that we
      traverse the correct list.
      Reported-by: NMichel Lespinasse <walken@google.com>
      Tested-by: NMichel Lespinasse <walken@google.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Matthew Garrett <matthew.garrett@nebula.com>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f464246d
    • P
      pinctrl: move subsystem mutex to pinctrl_dev struct · 42fed7ba
      Patrice Chotard 提交于
      This mutex avoids deadlock in case of use of multiple pin
      controllers. Before this modification, by using a global
      mutex, deadlock appeared when, for example, a call to
      pinctrl_pins_show() locked the pinctrl_mutex, called the
      ops->pin_dbg_show of a particular pin controller. If this
      pin controller needs I2C access to retrieve configuration
      information and I2C driver is using pinctrl to drive its
      pins, a call to pinctrl_select_state() try to lock again
      pinctrl_mutex which leads to a deadlock.
      
      Notice that the mutex grab from the two direction functions
      was moved into pinctrl_gpio_direction().
      
      For several cases, we can't replace pinctrl_mutex by
      pctldev->mutex, because at this stage, pctldev is
      not accessible :
      	- pinctrl_get()/pinctrl_put()
      	- pinctrl_register_maps()
      
      So add respectively pinctrl_list_mutex and
      pinctrl_maps_mutex in order to protect
      pinctrl_list and pinctrl_maps list instead.
      
      Reintroduce pinctrldev_list_mutex in
      find_pinctrl_by_of_node(),
      pinctrl_find_and_add_gpio_range()
      pinctrl_request_gpio(), pinctrl_free_gpio(),
      pinctrl_gpio_direction(), pinctrl_devices_show(),
      pinctrl_register() and pinctrl_unregister() to
      protect pinctrldev_list.
      
      Changes v2->v3:
      - Fix a missing EXPORT_SYMBOL_GPL() for pinctrl_select_state().
      
      Changes v1->v2:
      - pinctrl_select_state_locked() is removed, all lock mechanism
        is located inside pinctrl_select_state(). When parsing
        the state->setting list, take the per-pin-controller driver
        lock. (Patrice).
      - Introduce pinctrldev_list_mutex to protect pinctrldev_list
        in all functions which parse or modify pictrldev_list.
        (Patrice).
      - move find_pinctrl_by_of_node() from pinctrl/devicetree.c to
        pinctrl/core.c in order to protect pinctrldev_list.
        (Patrice).
      - Sink mutex:es into some functions and remove some _locked
        variants down to where the lists are actually accessed to
        make things simpler. (Linus)
      - Drop *all* mutexes completely from pinctrl_lookup_state()
        and pinctrl_select_state() - no relevant mutex was taken
        and it was unclear what this was protecting against. (Linus)
      
      Reported by : Seraphin Bonnaffe <seraphin.bonnaffe@stericsson.com>
      Signed-off-by: NPatrice Chotard <patrice.chotard@st.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      42fed7ba
    • L
      pinctrl/pinconfig: fix misplaced goto · cb6d315d
      Laurent Meunier 提交于
      This update contains a basic fix that went unseen through
      test and review.
      Signed-off-by: NLaurent Meunier <laurent.meunier@st.com>
      Reviewed-by: NPatrice Chotard <patrice.chotard@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      cb6d315d
    • J
      TTY: fix atime/mtime regression · 37b7f3c7
      Jiri Slaby 提交于
      In commit b0de59b5 ("TTY: do not update atime/mtime on read/write")
      we removed timestamps from tty inodes to fix a security issue and waited
      if something breaks.  Well, 'w', the utility to find out logged users
      and their inactivity time broke.  It shows that users are inactive since
      the time they logged in.
      
      To revert to the old behaviour while still preventing attackers to
      guess the password length, we update the timestamps in one-minute
      intervals by this patch.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      37b7f3c7
    • S
      s390/scm_blk: fix memleak in init function · fff60fab
      Sebastian Ott 提交于
      If the allocation of a single request fails the already allocated
      requests will not be freed.
      Reviewed-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fff60fab
    • S
      s390/scm_blk: allow more cluster size values · bd86055f
      Sebastian Ott 提交于
      Allow 0 and powers of 2 between 2 and 128 for write_cluster_size.
      Reviewed-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      bd86055f
    • S
      s390/cio: fix irq statistics · 3ad19b8f
      Sebastian Ott 提交于
      When we fetch an interrupt on the CCW console using tsch (via
      ccw_device_wait_idle formerly known as wait_cons_dev) we increment
      the irq count for the affected interruption class but it is not
      accounted as an IO interrupt.
      
      This is broken since commit b603d258
      "s390: remove superfluous tpi from wait_cons_dev"
      
      Fix it so that the sum of the individual interrupts per class matches
      the number of IO interrupts again.
      Reported-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3ad19b8f
    • H
      s390/memory hotplug: prevent offline of active memory increments · 94c16366
      Heiko Carstens 提交于
      In case a machine supports memory hotplug all active memory increments
      present at IPL time have been initialized with a "usecount" of 1.
      This is wrong if the memory increment size is larger than the memory
      section size of the memory hotplug code. If that is the case the
      usecount must be initialized with the number of memory sections that
      fit into one memory increment.
      Otherwise it is possible to put a memory increment into standby state
      even if there are still active sections.
      Afterwards addressing exceptions might happen which cause the kernel
      to panic.
      However even worse, if a memory increment was put into standby state
      and afterwards into active state again, it's contents would have been
      zeroed, leading to memory corruption.
      
      This was only an issue for machines that support standby memory and
      have at least 256GB memory.
      
      This is broken since commit fdb1bb15 "[S390] sclp/memory hotplug: fix
      initial usecount of increments".
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Reviewed-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: stable@vger.kernel.org # 2.6.39+
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      94c16366
    • T
      fbdev: fix check for fb_mmap's mmio availability · 138f296e
      Tomi Valkeinen 提交于
      Commit fc9bbca8 (vm: convert fb_mmap to
      vm_iomap_memory() helper) made fbmem.c use vm_iomap_memory, but also
      accidentally removed the check for mmio's availability.
      
      Add the check back.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      138f296e
    • T
      fbdev: improve fb_mmap bounds checks · 04f8afbe
      Tomi Valkeinen 提交于
      Improve fb_mmap bounds checks in gbefb, smscufx, udlfb and vfb drivers to
      prevent possible uint overflows.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Cc: Bernie Thompson <bernie@plugable.com>
      04f8afbe
    • T
      fbdev/ps3fb: use vm_iomap_memory() · 11bd5933
      Tomi Valkeinen 提交于
      Use vm_iomap_memory() instead of [io_]remap_pfn_range().
      vm_iomap_memory() gives us much simpler API to map memory to userspace,
      and reduces possibilities for bugs.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      11bd5933
    • A
      USB: ehci-msm: USB_MSM_OTG needs USB_PHY · 4626b8da
      Arnd Bergmann 提交于
      The Kconfig entry for USB_EHCI_MSM unconditionally selects USB_MSM_OTG,
      which is now only visible when USB_PHY is also enabled.
      
      This adds an appropriate dependency and enables USB_PHY in the msm
      defconfig, avoiding the Kbuild warning:
      
      warning: (USB_EHCI_MSM) selects USB_MSM_OTG which has unmet direct dependencies (USB_SUPPORT && USB_PHY && (USB || USB_GADGET) && ARCH_MSM)
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4626b8da
    • A
      USB: OHCI: avoid conflicting platform drivers · 8097804e
      Arnd Bergmann 提交于
      Like the EHCI driver, OHCI supports a large number of different platform
      glue drivers by directly including them, which causes problems with
      conflicting macro definitions in some cases. As more ARM architecture
      specific back-ends are required to coexist in a single build, we should
      split those out into separate drivers. Unfortunately, the infrastructure
      for that is still under development, so to give us more time, this uses
      a separate *_PLATFORM_DRIVER macro for each ARM specific OHCI backend,
      just like we already do on PowerPC and some of the other ARM platforms.
      
      In linux-3.10, only the SPEAr and CNS3xxx back-ends would actually conflict
      without this patch, but over time we would get more of them, so this
      is a way to avoid having to patch the driver every time it breaks. We
      should still split out all back-ends into separate loadable modules,
      but that work is only needed to improve code size and cleanliness after
      this patch, not for correctness.
      
      While we're here, this fixes the incorrectly sorted error path
      for the OMAP1 and OMAP3 backends to ensure we always unregister
      the exact set of drivers that were registered before erroring out.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8097804e
    • A
      USB: OMAP: ISP1301 needs USB_PHY · c3c683ea
      Arnd Bergmann 提交于
      The Kconfig entry for USB_OMAP unconditionally selects USB_ISP1301,
      which is now only visible when USB_PHY is also enabled.
      
      This adds an appropriate dependency and enables USB_PHY in the omap1
      defconfig, avoiding these build warnings:
      
      warning: (USB_OHCI_HCD && USB_OMAP) selects ISP1301_OMAP which has unmet direct dependencies (USB_SUPPORT && USB_PHY && I2C && ARCH_OMAP_OTG)
      
      Also fix a Makefile typo while we're at it.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c3c683ea
    • A
      USB: lpc32xx: ISP1301 needs USB_PHY · 64e98a79
      Arnd Bergmann 提交于
      The Kconfig entry for USB_LPC32XX unconditionally selects USB_ISP1301,
      which is now only visible when USB_PHY is also enabled.
      
      This adds an appropriate dependency and enables USB_PHY in the msm
      defconfig, avoiding these build errors:
      
      warning: (USB_LPC32XX) selects USB_ISP1301 which has unmet direct dependencies (USB_SUPPORT && USB_PHY && (USB || USB_GADGET) && I2C)
      drivers/built-in.o: In function `usb_hcd_nxp_probe':
      drivers/usb/host/ohci-nxp.c:224: undefined reference to `isp1301_get_client'
      drivers/built-in.o: In function `lpc32xx_udc_probe':
      drivers/usb/gadget/lpc32xx_udc.c:3071: undefined reference to `isp1301_get_client'
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Roland Stigge <stigge@antcom.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      64e98a79
  4. 25 4月, 2013 12 次提交
  5. 24 4月, 2013 3 次提交