1. 22 9月, 2012 1 次提交
  2. 16 9月, 2012 1 次提交
    • M
      mfd: core: Push irqdomain mapping out into devices · 0848c94f
      Mark Brown 提交于
      Currently the MFD core supports remapping MFD cell interrupts using an
      irqdomain but only if the MFD is being instantiated using device tree
      and only if the device tree bindings use the pattern of registering IPs
      in the device tree with compatible properties.  This will be actively
      harmful for drivers which support non-DT platforms and use this pattern
      for their DT bindings as it will mean that the core will silently change
      remapping behaviour and it is also limiting for drivers which don't do
      DT with this particular pattern.  There is also a potential fragility if
      there are interrupts not associated with MFD cells and all the cells are
      omitted from the device tree for some reason.
      
      Instead change the code to take an IRQ domain as an optional argument,
      allowing drivers to take the decision about the parent domain for their
      interrupts.  The one current user of this feature is ab8500-core, it has
      the domain lookup pushed out into the driver.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      0848c94f
  3. 11 9月, 2012 3 次提交
  4. 06 9月, 2012 2 次提交
    • P
      serial: diminish usage of struct serial_uart_config · 4b71598b
      Paul Gortmaker 提交于
      This structure might have made sense many years ago, but at this
      point it is only used in one specific driver, and referenced in
      stale comments elsewhere.  Rather than change the sunsu.c driver,
      simply move the struct to be within the exclusive domain of that
      driver, so it won't get inadvertently picked up and used by other
      serial drivers going forward.  The comments referencing the now
      driver specific struct are updated accordingly.
      
      Note that 8250.c has a struct that is similar in usage, with the
      name serial8250_config; but is 100% independent and untouched here.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4b71598b
    • S
      staging: zcache: fix cleancache race condition with shrinker · 6d7d9798
      Seth Jennings 提交于
      This patch fixes a race condition that results in memory
      corruption when using cleancache.
      
      The race exists between the zcache shrinker handler,
      shrink_zcache_memory() and cleancache_get_page().
      
      In most cases, the shrinker will both evict a zbpg
      from its buddy list and flush it from tmem before a
      cleancache_get_page() occurs on that page. A subsequent
      cleancache_get_page() will fail in the tmem layer.
      
      In the rare case that two occur together and the
      cleancache_get_page() path gets through the tmem
      layer before the shrinker path can flush tmem,
      zbud_decompress() does a check to see if the zbpg is a
      "zombie", i.e. not on a buddy list, which means the shrinker
      is in the process of reclaiming it. If the zbpg is a zombie,
      zbud_decompress() returns -EINVAL.
      
      However, this return code is being ignored by the caller,
      zcache_pampd_get_data_and_free(), which results in the
      caller of cleancache_get_page() thinking that the page has
      been properly retrieved when it has not.
      
      This patch modifies zcache_pampd_get_data_and_free() to
      convey the failure up the stack so that the caller of
      cleancache_get_page() knows the page retrieval failed.
      
      This needs to be applied to stable trees as well.
      zcache-main.c was named zcache.c before v3.1, so
      I'm not sure how you want to handle trees earlier
      than that.
      Signed-off-by: NSeth Jennings <sjenning@linux.vnet.ibm.com>
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6d7d9798
  5. 05 9月, 2012 12 次提交
    • D
      Staging: Android alarm: IOCTL command encoding fix · 6bd4a5d9
      Dae S. Kim 提交于
      Fixed a bug. Data was being written to user space using an IOCTL
      command encoded with _IOC_WRITE access mode.
      Signed-off-by: NDae S. Kim <dae@velatum.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6bd4a5d9
    • M
      staging: vt6656: [BUG] - Failed connection, incorrect endian. · aa209eef
      Malcolm Priestley 提交于
      Hi,
      
      This patch fixes a bug with driver failing to negotiate a connection.
      
      The bug was traced to commit
      203e4615
      staging: vt6656: removed custom definitions of Ethernet packet types
      
      In that patch, definitions in include/linux/if_ether.h replaced ones
      in tether.h which had both big and little endian definitions.
      
      include/linux/if_ether.h only refers to big endian values, cpu_to_be16
      should be used for the correct endian architectures.
      Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com>
      Cc: stable <stable@vger.kernel.org> # 2.6.37+
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aa209eef
    • T
      staging: ozwpan: fix memcmp() test in oz_set_active_pd() · 07732be2
      Tomas Winkler 提交于
      "addr" is a pointer so it's either 4 or 8 bytes, but actually we want
      to compare 6 bytes (ETH_ALEN).
      
      As network stack already provides helper function
      is_zero_ether_addr() we use that instead of memcmp
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Acked-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NRupesh Gujare <rgujare@ozmodevices.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      07732be2
    • E
      staging: wlan-ng: Fix problem with wrong arguments · 01f8a27e
      Emil Goode 提交于
      The function pointer scan in struct cfg80211_ops is not
      supposed to be assigned a function with a struct net_device
      pointer as an argument. Instead access the net_device struct
      in the following way:
      
      struct net_device *dev = request->wdev->netdev;
      
      sparse gives these warnings:
      
      drivers/staging/wlan-ng/cfg80211.c:726:17: warning:
              incorrect type in initializer (incompatible argument 2
              (different base types))
              expected int ( *scan )( ... )
              got int ( extern [toplevel] *<noident> )( ... )
      
      drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
              initialization from incompatible pointer type [enabled by default]
      
      drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
              (near initialization for ‘prism2_usb_cfg_ops.scan’)
              [enabled by default]
      Signed-off-by: NEmil Goode <emilgoode@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01f8a27e
    • I
      staging: comedi: das08: Correct AO output for das08jr-16-ao · 61ed59ed
      Ian Abbott 提交于
      Don't zero out bits 15..12 of the data value in `das08jr_ao_winsn()` as
      that knobbles the upper three-quarters of the output range for the
      'das08jr-16-ao' board.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      61ed59ed
    • I
      staging: comedi: das08: Correct AI encoding for das08jr-16-ao · e6391a18
      Ian Abbott 提交于
      The element of `das08_boards[]` for the 'das08jr-16-ao' board has the
      `ai_encoding` member set to `das08_encode12`.  It should be set to
      `das08_encode16` same as the 'das08jr/16' board.  After all, this board
      has 16-bit AI resolution.
      
      The description of the A/D LSB register at offset 0 seems incorrect in
      the user manual "cio-das08jr-16-ao.pdf" as it implies that the AI
      resolution is only 12 bits.  The diagrams of the A/D LSB and MSB
      registers show 15 data bits and a sign bit, which matches what the
      software expects for the `das08_encode16` AI encoding method.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e6391a18
    • I
      staging: comedi: das08: Fix PCI ref count · 4a7a4f95
      Ian Abbott 提交于
      When attaching a PCI device manually via the comedi driver `attach` hook
      (`das08_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
      ioctl), its reference count is incremented in the `for_each_pci_dev`
      loop (in `das08_find_pci()`).  It is decremented when the `detach` hook
      (`das08_detach()`) is called to detach the device.  However, when the
      PCI device is attached automatically via the `attach_pci` hook
      (`das08_attach_pci()`, called at probe time via
      `comedi_pci_auto_config()`) it's reference count is not incremented so
      there will be an unmatched decrement when detaching the device.
      
      Increment the PCI device reference count in `das08_attach_pci()` to
      correct the mismatch.
      
      Once support for manual configuration has been removed from this driver,
      the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4a7a4f95
    • I
      staging: comedi: amplc_pci230: Fix PCI ref count · 4375e61e
      Ian Abbott 提交于
      When attaching a PCI device manually via the comedi driver `attach` hook
      (`pci230_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
      ioctl), its reference count is incremented in the `for_each_pci_dev`
      loop (in `pci230_find_pci_dev()`).  It is decremented when the `detach`
      hook (`pci230_detach()`) is called to detach the device.  However, when
      the PCI device is attached automatically via the `attach_pci` hook
      (`pci230_attach_pci()`, called at probe time via
      `comedi_pci_auto_config()`) it's reference count is not incremented so
      there will be an unmatched decrement when detaching the device.
      
      Increment the PCI device reference count in `pci230_attach_pci()` to
      correct the mismatch.
      
      Once support for manual configuration has been removed from this driver,
      the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4375e61e
    • I
      staging: comedi: amplc_pc263: Fix PCI ref count · a0234ade
      Ian Abbott 提交于
      When attaching a PCI device manually via the comedi driver `attach` hook
      (`pc263_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
      ioctl), its reference count is incremented in the `for_each_pci_dev`
      loop (in `pc263_find_pci_dev()`).  It is decremented when the `detach`
      hook (`pc263_detach()`) is called to detach the device.  However, when
      the PCI device is attached automatically via the `attach_pci` hook
      (`pc263_attach_pci()`, called at probe time via
      `comedi_pci_auto_config()`) it's reference count is not incremented so
      there will be an unmatched decrement when detaching the device.
      
      Increment the PCI device reference count in `pc263_attach_pci()` to
      correct the mismatch.
      
      Once support for manual configuration has been removed from this driver,
      the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a0234ade
    • I
      staging: comedi: amplc_pc236: Fix PCI ref count · 3abcfe0e
      Ian Abbott 提交于
      When attaching a PCI device manually via the comedi driver `attach` hook
      (`pc236_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
      ioctl), its reference count is incremented in the `for_each_pci_dev`
      loop (in `pc236_find_pci_dev()`).  It is decremented when the `detach`
      hook (`pc236_detach()`) is called to detach the device.  However, when
      the PCI device is attached automatically via the `attach_pci` hook
      (`pc236_attach_pci()`, called at probe time via
      `comedi_pci_auto_config()`) it's reference count is not incremented so
      there will be an unmatched decrement when detaching the device.
      
      Increment the PCI device reference count in `pc236_attach_pci()` to
      correct the mismatch.
      
      Once support for manual configuration has been removed from this driver,
      the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3abcfe0e
    • I
      staging: comedi: amplc_dio200: Fix PCI ref count · 1a6671d2
      Ian Abbott 提交于
      When attaching a PCI device manually via the comedi driver `attach` hook
      (`dio200_attach()`) (called by the comedi core for the
      `COMEDI_DEVCONFIG` ioctl), its reference count is incremented in the
      `for_each_pci_dev` loop (in `dio200_find_pci_dev()`).  It is decremented
      when the `detach` hook (`dio200_detach()`) is called to detach the
      device.  However, when the PCI device is attached automatically via the
      `attach_pci` hook (`dio200_attach_pci()`, called at probe time via
      `comedi_pci_auto_config()`) it's reference count is not incremented so
      there will be an unmatched decrement when detaching the device.
      
      Increment the PCI device reference count in `dio200_attach_pci()` to
      correct the mismatch.
      
      Once support for manual configuration has been removed from this driver,
      the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1a6671d2
    • I
      staging: comedi: amplc_pci224: Fix PCI ref count · cadf84bf
      Ian Abbott 提交于
      When attaching a PCI device manually via the comedi driver `attach` hook
      (`pci224_attach()`) (called by the comedi core for the
      `COMEDI_DEVCONFIG` ioctl), its reference count is incremented in the
      `for_each_pci_dev` loop (in `pci224_find_pci_dev()`).  It is decremented
      when the `detach` hook (`pci224_detach()`) is called to detach the
      device.  However, when the PCI device is attached automatically via the
      `attach_pci` hook (`pci224_attach_pci()`, called at probe time via
      `comedi_pci_auto_config()`) it's reference count is not incremented so
      there will be an unmatched decrement when detaching the device.
      
      Increment the PCI device reference count in `pci224_attach_pci()` to
      correct the mismatch.
      
      Once support for manual configuration has been removed from this driver,
      the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
      
      Cc: stable <stable@vger.kernel.org> # 3.5.x
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cadf84bf
  6. 28 8月, 2012 2 次提交
  7. 18 8月, 2012 2 次提交
  8. 17 8月, 2012 16 次提交
  9. 15 8月, 2012 1 次提交