]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:11 +0000 (11:00 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

11 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:10 +0000 (11:00 +1000)]
Merge remote-tracking branch 'tty.current/tty-linus'

11 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:09 +0000 (11:00 +1000)]
Merge remote-tracking branch 'wireless/master'

11 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:08 +0000 (11:00 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

11 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:07 +0000 (11:00 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:06 +0000 (11:00 +1000)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'powerpc-merge/merge'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:05 +0000 (11:00 +1000)]
Merge remote-tracking branch 'powerpc-merge/merge'

11 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:04 +0000 (11:00 +1000)]
Merge remote-tracking branch 'm68k-current/for-linus'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:04 +0000 (11:00 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agoMerge remote-tracking branch 'arc-current/for-curr'
Stephen Rothwell [Fri, 7 Jun 2013 01:00:03 +0000 (11:00 +1000)]
Merge remote-tracking branch 'arc-current/for-curr'

11 years agocharger-manager: Ensure event is not used as format string
Kees Cook [Thu, 6 Jun 2013 20:52:21 +0000 (13:52 -0700)]
charger-manager: Ensure event is not used as format string

The exposed interface for cm_notify_event() could result in the event msg
string being parsed as a format string. Make sure it is only used as a
literal string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agopower_supply: Replace strict_strtoul() with kstrtoul()
Jingoo Han [Mon, 3 Jun 2013 09:05:05 +0000 (18:05 +0900)]
power_supply: Replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because strict_strtoul()
is obsolete. Thus, kstrtoul() should be used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agogeneric-adc-battery: Fix checking if none of the channels are supported
Axel Lin [Fri, 24 May 2013 17:41:44 +0000 (01:41 +0800)]
generic-adc-battery: Fix checking if none of the channels are supported

If none of the channels are supported, index is 0. Also ensure to return
error code instead of 0 in goto second_mem_fail path.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: anish kumar <anish198519851985@gmail.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agopower: Use platform_{get,set}_drvdata()
Jingoo Han [Thu, 23 May 2013 10:34:39 +0000 (19:34 +0900)]
power: Use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agopm2301_charger: Return error if create_singlethread_workqueue fails
Axel Lin [Thu, 16 May 2013 13:17:04 +0000 (21:17 +0800)]
pm2301_charger: Return error if create_singlethread_workqueue fails

Return error instead of 0 if create_singlethread_workqueue call fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agopm2301_charger: Fix NULL pointer dereference
Axel Lin [Thu, 16 May 2013 09:31:00 +0000 (17:31 +0800)]
pm2301_charger: Fix NULL pointer dereference

Add checking pl_data in probe, this prevent possible NULL pointer
dereference. Also fix NULL pointer deference in dev_err when allocate
memory for pm2 fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agolp8727_charger: Support the device tree feature
Kim, Milo [Fri, 10 May 2013 07:17:51 +0000 (07:17 +0000)]
lp8727_charger: Support the device tree feature

The interrupt and charging parameters are configurable in the device tree
structure. In the board test, a GPIO is used for handling LP8727
interrupts. The device tree binding documentation is added also.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agotwl4030_charger: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:24:33 +0000 (13:24 +0900)]
twl4030_charger: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agorx51_battery: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:23:45 +0000 (13:23 +0900)]
rx51_battery: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agojz4740-battery: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:22:41 +0000 (13:22 +0900)]
jz4740-battery: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agogpio-charger: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:22:00 +0000 (13:22 +0900)]
gpio-charger: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agobq27x00_battery: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:21:16 +0000 (13:21 +0900)]
bq27x00_battery: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agoab8500_bm: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:20:15 +0000 (13:20 +0900)]
ab8500_bm: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years ago88pm860x_charger: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:17:24 +0000 (13:17 +0900)]
88pm860x_charger: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years ago88pm860x_battery: Remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 6 May 2013 04:16:30 +0000 (13:16 +0900)]
88pm860x_battery: Remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on
probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is
not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
11 years agonet/macb: change RX path for GEM
Nicolas Ferre [Tue, 4 Jun 2013 21:57:12 +0000 (21:57 +0000)]
net/macb: change RX path for GEM

GEM is able to adapt its DMA buffer size, so change
the RX path to take advantage of this possibility and
remove all kind of memcpy in this path.
This modification introduces function pointers for managing
differences between MACB and GEM adapter type.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/macb: increase RX buffer size for GEM
Nicolas Ferre [Tue, 4 Jun 2013 21:57:11 +0000 (21:57 +0000)]
net/macb: increase RX buffer size for GEM

Macb Ethernet controller requires a RX buffer of 128 bytes. It is
highly sub-optimal for Gigabit-capable GEM that is able to use
a bigger DMA buffer. Change this constant and associated macros
with data stored in the private structure.
RX DMA buffer size has to be multiple of 64 bytes as indicated in
DMA Configuration Register specification.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: enclose PM code into #ifdef CONFIG_PM
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:52:37 +0000 (09:52 +0000)]
sh_eth: enclose PM code into #ifdef CONFIG_PM

Put '#ifdef CONFIG_PM' around sh_eth_runtime_nop() and 'sh_eth_dev_pm_ops'.
Add '#define SH_ETH_PM_OPS' to facilitate initialization of driver's 'pm' field
depending on whether CONFIG_PM is enabled.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: added the changelog, reworded the subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: consolidate sh_eth_reset()
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:51:39 +0000 (09:51 +0000)]
sh_eth: consolidate sh_eth_reset()

This driver has sh_eth_reset() function for each SoC and this function is almost
always the same, except for the several a bit different variations for Gigabit
Ethernet.  Consolidate every variation into a single function -- which allows
us to get  rid of some more #ifdef'fery.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: moved the new sh_eth_reset() and sh_eth_is_gether() up to decrease the
patch size, fixed function call continuation lines' indentation, reworded the
changelog, reworded the subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: remove #ifdef around sh_eth_select_mii()
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:50:30 +0000 (09:50 +0000)]
sh_eth: remove #ifdef around sh_eth_select_mii()

We can simply remove #ifdef'fery around sh_eth_select_mii(). We have to annotate
it with '__maybe_unused' then.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: added the changelog, reworded the subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: add IRQ flags to 'struct sh_eth_cpu_data'
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:49:30 +0000 (09:49 +0000)]
sh_eth: add IRQ flags to 'struct sh_eth_cpu_data'

The driver supports some SH and SH-Mobile SOCs. There are SOCs with two or more
Ethernet devices, for these we need to pass IRQF_SHARED to request_irq().  Add
the 'irq_flags' field to the 'struct sh_eth_cpu_data' instead of #ifdef'fery.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: properly aligned request_irq() call continuation line, reworded the
changelog, reworded the subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: remove SH_ETH_HAS_TSU
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:48:09 +0000 (09:48 +0000)]
sh_eth: remove SH_ETH_HAS_TSU

Remove SH_ETH_HAS_TSU #define's and #ifdef's. Set three 'struct net_device_ops'
methods that depend on the presence of TSU basing on the 'tsu' field of 'struct
sh_eth_cpu_data'.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: made two method assignments one-liners, added the changelog, reworded
the subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: remove duplicate sh_eth_set_duplex() definitions
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:45:25 +0000 (09:45 +0000)]
sh_eth: remove duplicate sh_eth_set_duplex() definitions

Remove all the duplicate definitions of sh_eth_set_duplex() under  different
#ifdef's, leaving only one outside the #ifdef's. We have to annotate it with
'__maybe_unused' since it's called not from all SoC #ifdef blocks.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: annotated sh_eth_set_duplex() as '__maybe_unused', added the changelog,
reworded the subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: use EDSR_ENALL to set EDSR
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:44:27 +0000 (09:44 +0000)]
sh_eth: use EDSR_ENALL to set EDSR

Use now always available EDSR_ENALL instead of the bare number to set EDSR.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: added the changelog, reworded the subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh_eth: remove #ifdef around EDSR and GECMR bit definitions
Nobuhiro Iwamatsu [Thu, 6 Jun 2013 09:43:16 +0000 (09:43 +0000)]
sh_eth: remove #ifdef around EDSR and GECMR bit definitions

Remove #ifdef around 'enum EDSR_BIT' and 'enum GECMR_BIT', replacing it with the
comments on which SoCs these registers exist.

SH7757 also has EDSR, so add a comment about it to 'enum EDSR_BIT'.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[Sergei: folded in the former patch #2, updated the changelog, reworded the
subject, changing the prefix.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'for-usb-next-2013-06-06' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Thu, 6 Jun 2013 22:21:02 +0000 (15:21 -0700)]
Merge tag 'for-usb-next-2013-06-06' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next

Sarah writes:

xHCI: USB 2.0 Link PM and misc cleanup patches

Hi Greg,

Here's six patches to be queued for 3.11.

The first four add support for a new type of host hardware-managed USB
2.0 Link Power Management.  Hosts with BESL support, including Intel
Haswell ULT systems, will now be able to have USB 2.0 devices go into
the lower power link state (L1) in between packets.  These patches have
been tested on Haswell ULT platforms with USB 2.0 webcams that support
Link PM.

The other two patches are clean up.  One from Julius clarifies the xHCI
endpoint context debugging to make it consistent with standard endpoint
addresses, instead of xHCI endpoint context indexes.  The one from Alex
changes the xHCI driver to be consistent about passing a void pointer to
the xHCI IRQ handler.

Sarah Sharp

11 years agoMerge branch 'for-3.11' into for-next
Tejun Heo [Thu, 6 Jun 2013 21:06:01 +0000 (14:06 -0700)]
Merge branch 'for-3.11' into for-next

11 years agosata highbank: add bit-banged SGPIO driver support
Mark Langsdorf [Thu, 6 Jun 2013 12:52:41 +0000 (07:52 -0500)]
sata highbank: add bit-banged SGPIO driver support

Highbank supports SGPIO by bit-banging out the SGPIO signals over
three GPIO pins defined in the DTB. Add support for this SGPIO
functionality.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
11 years agoahci: make ahci_transmit_led_message into a function pointer
Mark Langsdorf [Thu, 30 May 2013 20:17:30 +0000 (15:17 -0500)]
ahci: make ahci_transmit_led_message into a function pointer

Create a new ata_port_operations function pointer called
transmit_led_message and give it the default value of
ahci_transmit_led_message. This allows AHCI controllers with
non-standard LED interfaces to use the existing em_ interface.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
11 years agoMerge branch 'labeled-nfs' into linux-next
Trond Myklebust [Thu, 6 Jun 2013 20:43:29 +0000 (16:43 -0400)]
Merge branch 'labeled-nfs' into linux-next

* labeled-nfs:
  NFS: Add in v4.2 callback operation
  NFS: Make callbacks minor version generic
  Kconfig: Add Kconfig entry for Labeled NFS V4 client
  NFS: Extend NFS xattr handlers to accept the security namespace
  NFS: Client implementation of Labeled-NFS
  NFS: Add label lifecycle management
  NFS:Add labels to client function prototypes
  NFSv4: Extend fattr bitmaps to support all 3 words
  NFSv4: Introduce new label structure
  NFSv4: Add label recommended attribute and NFSv4 flags
  NFSv4.2: Added NFS v4.2 support to the NFS client
  SELinux: Add new labeling type native labels
  LSM: Add flags field to security_sb_set_mnt_opts for in kernel mount data.
  Security: Add Hook to test if the particular xattr is part of a MAC model.
  Security: Add hook to calculate context based on a negative dentry.
  NFS: Add NFSv4.2 protocol constants

Conflicts:
fs/nfs/nfs4proc.c

11 years agodrm/i915: pipe config quirk infrastructure plus sdvo mode.flags fix
Daniel Vetter [Thu, 6 Jun 2013 12:55:52 +0000 (14:55 +0200)]
drm/i915: pipe config quirk infrastructure plus sdvo mode.flags fix

For various reasons the hw state readout might not be able to
faithfully match the hw state:
- broken hw (like the case which motivated this patch here where the
  sdvo encoder does not implemented mandatory functionality
  correctly).
- platforms which are not supported fully with the pipe config
  infrastructure
- if our code doesn't support a given hw configuration natively, e.g.
  special restrictions on the per-pipe panel fitters when they're used
  in high-quality scaling modes.

In all these cases both fastboot and the hw state cross checker need
to be aware of these cases and act accordingly. To be able to do this
add a new quirk flag to the pipe config structure.

The specific case at hand is an sdvo encoder which doesn't implement
the get_timings function, so adjusted_mode flags will be wrong. The
strange thing though is that the encoder _does_ work, even though it
doesn't implement any of the timings functions (so neither get nor
set, neither for input nor output timings).

Not that non-compliant sdvo encoder are any surprise at all ...

v2:
- Don't read random garbage from the dtd if the get_timings call
  failed (suggested by Chris).
- Still check the interlaced flag, that's read out from someplace
  else. We want maximal paranoia, after all.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoNFS: Add in v4.2 callback operation
Bryan Schumaker [Wed, 5 Jun 2013 15:15:02 +0000 (11:15 -0400)]
NFS: Add in v4.2 callback operation

NFS v4.2 adds a CB_OFFLOAD operation used by COPY and WRITE_PLUS.  Since
neither of these operations have been implemented yet, simply return
NFS4ERR_NOTSUPP.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFS: Make callbacks minor version generic
Bryan Schumaker [Wed, 5 Jun 2013 15:15:01 +0000 (11:15 -0400)]
NFS: Make callbacks minor version generic

I found a few places that hardcode the minor version number rather than
making it dependent on the protocol the callback came in over.  This
patch makes it easier to add new minor versions in the future.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Close another NFSv4 recovery race
Trond Myklebust [Wed, 29 May 2013 17:34:46 +0000 (13:34 -0400)]
NFSv4: Close another NFSv4 recovery race

State recovery currently relies on being able to find a valid
nfs_open_context in the inode->open_files list.
We therefore need to put the nfs_open_context on the list while
we're still protected by the sp->so_reclaim_seqcount in order
to avoid reboot races.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Move dentry instantiation into the NFSv4-specific atomic open code
Trond Myklebust [Wed, 29 May 2013 17:11:28 +0000 (13:11 -0400)]
NFSv4: Move dentry instantiation into the NFSv4-specific atomic open code

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Refactor _nfs4_open_and_get_state to set ctx->state
Trond Myklebust [Wed, 29 May 2013 17:17:04 +0000 (13:17 -0400)]
NFSv4: Refactor _nfs4_open_and_get_state to set ctx->state

Instead of having the callers set ctx->state, do it inside
_nfs4_open_and_get_state.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Cleanup: pass the nfs_open_context to nfs4_do_open
Trond Myklebust [Wed, 29 May 2013 16:37:49 +0000 (12:37 -0400)]
NFSv4: Cleanup: pass the nfs_open_context to nfs4_do_open

All the callers have an open_context at this point, and since we always
need one in order to do state recovery, it makes sense to use it as the
basis for the nfs4_do_open() call.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4: Remove redundant check for FMODE_EXEC in nfs_finish_open
Trond Myklebust [Wed, 29 May 2013 15:53:29 +0000 (11:53 -0400)]
NFSv4: Remove redundant check for FMODE_EXEC in nfs_finish_open

We already check the EXEC access mode in the lower layers.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove redundant call to rpc_set_running() in __rpc_execute()
Trond Myklebust [Wed, 22 May 2013 22:52:18 +0000 (18:52 -0400)]
SUNRPC: Remove redundant call to rpc_set_running() in __rpc_execute()

The RPC_TASK_RUNNING flag will always have been set in rpc_make_runnable()
once we get past the test for out_of_line_wait_on_bit() returning
ERESTARTSYS.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove unused functions rpc_task_set/has_priority
Trond Myklebust [Tue, 21 May 2013 22:36:27 +0000 (18:36 -0400)]
SUNRPC: Remove unused functions rpc_task_set/has_priority

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove the unused helpers task_for_each() and task_for_first()
Trond Myklebust [Tue, 21 May 2013 16:58:57 +0000 (12:58 -0400)]
SUNRPC: Remove the unused helpers task_for_each() and task_for_first()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Remove unused function rpc_queue_empty
Trond Myklebust [Tue, 21 May 2013 16:51:32 +0000 (12:51 -0400)]
SUNRPC: Remove unused function rpc_queue_empty

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoSUNRPC: Fix a potential race in rpc_execute
Trond Myklebust [Tue, 21 May 2013 03:00:18 +0000 (23:00 -0400)]
SUNRPC: Fix a potential race in rpc_execute

If the rpc_task is asynchronous, it could theoretically finish executing
on the workqueue it was assigned by rpc_make_runnable() before we get
round to testing RPC_IS_ASYNC() in rpc_execute.

In practice, however, all the existing callers hold a reference to the
rpc_task, so this can't happen today...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Simplify setting the layout header credential
Trond Myklebust [Tue, 21 May 2013 13:26:49 +0000 (09:26 -0400)]
NFSv4.1: Simplify setting the layout header credential

ctx->cred == ctx->state->owner->so_cred, so let's just use the former.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Enable state protection
Trond Myklebust [Mon, 20 May 2013 16:24:03 +0000 (12:24 -0400)]
NFSv4.1: Enable state protection

Use the EXCHGID4_FLAG_BIND_PRINC_STATEID exchange_id flag to enable
stateid protection. This means that if we create a stateid using a
particular principal, then we must use the same principal if we
want to change that state.
IOW: if we OPEN a file using a particular credential, then we have
to use the same credential in subsequent OPEN_DOWNGRADE, CLOSE,
or DELEGRETURN operations that use that stateid.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Use layout credentials for get_deviceinfo calls
Trond Myklebust [Mon, 20 May 2013 15:42:54 +0000 (11:42 -0400)]
NFSv4.1: Use layout credentials for get_deviceinfo calls

This is not strictly needed, since get_deviceinfo is not allowed to
return NFS4ERR_ACCESS or NFS4ERR_WRONG_CRED, but lets do it anyway
for consistency with other pNFS operations.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that test_stateid and free_stateid use correct credentials
Trond Myklebust [Mon, 20 May 2013 15:20:27 +0000 (11:20 -0400)]
NFSv4.1: Ensure that test_stateid and free_stateid use correct credentials

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that reclaim_complete uses the right credential
Trond Myklebust [Mon, 20 May 2013 15:05:17 +0000 (11:05 -0400)]
NFSv4.1: Ensure that reclaim_complete uses the right credential

We want to use the same credential for reclaim_complete as we used
for the exchange_id call.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that layoutreturn uses the correct credential
Trond Myklebust [Mon, 20 May 2013 14:43:47 +0000 (10:43 -0400)]
NFSv4.1: Ensure that layoutreturn uses the correct credential

We need to use the same credential as was used for the layoutget
and/or layoutcommit operations.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that layoutget is called using the layout credential
Trond Myklebust [Mon, 20 May 2013 14:49:34 +0000 (10:49 -0400)]
NFSv4.1: Ensure that layoutget is called using the layout credential

Ensure that we use the same credential for layoutget, layoutcommit and
layoutreturn.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: reformat license text to fit 80 cols
Aaro Koskinen [Thu, 6 Jun 2013 19:35:05 +0000 (22:35 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: reformat license text to fit 80 cols

Reformat the original license text to fit in 80-column terminal. No
change in wording.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: delete CVS keyword marker
Aaro Koskinen [Thu, 6 Jun 2013 19:35:04 +0000 (22:35 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: delete CVS keyword marker

Delete CVS keyword marker and a comment that the file is autogenerated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: avoid long lines in comments
Aaro Koskinen [Thu, 6 Jun 2013 19:35:03 +0000 (22:35 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: avoid long lines in comments

Format all comments (except license text) to fit to 80 column terminals.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: clean up macros
Aaro Koskinen [Thu, 6 Jun 2013 19:35:02 +0000 (22:35 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: clean up macros

Use helper macros to avoid copy-paste and too long lines.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: delete unused macros
Aaro Koskinen [Thu, 6 Jun 2013 19:35:01 +0000 (22:35 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: delete unused macros

Delete some unused macros.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: fix comment style
Aaro Koskinen [Thu, 6 Jun 2013 19:35:00 +0000 (22:35 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: fix comment style

Adjust struct member comments to be closer to kernel-doc format.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: fix struct indentation
Aaro Koskinen [Thu, 6 Jun 2013 19:34:59 +0000 (22:34 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: fix struct indentation

Fix struct indentation.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: fix brace placement
Aaro Koskinen [Thu, 6 Jun 2013 19:34:58 +0000 (22:34 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: fix brace placement

Fix placement of braces in structs and unions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: delete unused union members
Aaro Koskinen [Thu, 6 Jun 2013 19:34:57 +0000 (22:34 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: delete unused union members

Delete unused union members.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: cvmx-usbcx-defs.h: delete unused data types
Aaro Koskinen [Thu, 6 Jun 2013 19:34:56 +0000 (22:34 +0300)]
staging: octeon-usb: cvmx-usbcx-defs.h: delete unused data types

Delete unused data types.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: ft1000-pcmcia: ft1000_dnld.c: fixed four checkpatch
Aldo Iljazi [Thu, 6 Jun 2013 19:52:12 +0000 (22:52 +0300)]
Staging: ft1000-pcmcia: ft1000_dnld.c: fixed four checkpatch

Fixed four checkpatch error complains, specifically:
ft1000_dnld.c:512: ERROR: space prohibited after that '&' (ctx:WxW)
ft1000_dnld.c:514: ERROR: space prohibited after that '&' (ctx:WxW)
ft1000_dnld.c:694: ERROR: space prohibited before that close parenthesis ')'
ft1000_dnld.c:713: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Aldo Iljazi <neonsync1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agowusbcore wire adapter: ignore HWA_NOTIF_BPST_ADJ notifications
Thomas Pugliese [Thu, 6 Jun 2013 19:39:23 +0000 (14:39 -0500)]
wusbcore wire adapter: ignore HWA_NOTIF_BPST_ADJ notifications

No action is needed for the HWA_NOTIF_BPST_ADJ event.  Ignore it instead
of printing a warning to the log since these events can happen dozens of
times per second.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUWB: HWA: add support for Alereon 5310 and 5611 devices
Thomas Pugliese [Thu, 6 Jun 2013 19:55:55 +0000 (14:55 -0500)]
UWB: HWA: add support for Alereon 5310 and 5611 devices

This patch adds support for the Alereon 5310 and 5611 devices to the
HWA-rc driver.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: imx: Improve Kconfig text
Fabio Estevam [Wed, 5 Jun 2013 03:58:48 +0000 (00:58 -0300)]
serial: imx: Improve Kconfig text

Some improvements in the Kconfig text:

- Vendor is Freescale now
- Provide a better example for the console parameter, which is something like
console=ttymxc0
- Do not pass the names of ancient bootloaders

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: imx: Allow module build
Fabio Estevam [Wed, 5 Jun 2013 03:58:47 +0000 (00:58 -0300)]
serial: imx: Allow module build

There is no need to only allow the serial driver to be built-in.

Allow the imx serial driver to be built as a module.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: imx: Fix warning when !CONFIG_SERIAL_IMX_CONSOLE
Fabio Estevam [Wed, 5 Jun 2013 03:58:46 +0000 (00:58 -0300)]
serial: imx: Fix warning when !CONFIG_SERIAL_IMX_CONSOLE

When CONFIG_SERIAL_IMX_CONSOLE is not selected the following build warnings
appear:

drivers/tty/serial/imx.c:274:13: warning: 'imx_port_ucrs_save' defined but not used [-Wunused-function]
drivers/tty/serial/imx.c:283:13: warning: 'imx_port_ucrs_restore' defined but not used [-Wunused-function]

imx_port_ucrs_save() and imx_port_ucrs_restore() are only used when
CONFIG_CONSOLE_POLL or CONFIG_SERIAL_IMX_CONSOLE are selected, so protect these
functions declaration with a proper ifdef.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty/serial/sirf: fix error propagation in sirfsoc_uart_probe()
Alexey Khoroshilov [Wed, 5 Jun 2013 21:28:12 +0000 (01:28 +0400)]
tty/serial/sirf: fix error propagation in sirfsoc_uart_probe()

If pinctrl_get_select_default() fails, sirfsoc_uart_probe()
returns IS_ERR(result) instead of PTR_ERR(result).

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: omap: fix potential NULL pointer dereference in serial_omap_runtime_suspend()
Wei Yongjun [Wed, 5 Jun 2013 02:04:49 +0000 (10:04 +0800)]
serial: omap: fix potential NULL pointer dereference in serial_omap_runtime_suspend()

The dereference to 'up' should be moved below the NULL test.
Introduced by commit ddd85e225c8885b5e4419b0499ab27100e7c366a
(serial: omap: prevent runtime PM for "no_console_suspend")

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty: serial: Enable uartlite for ARM zynq
Michal Simek [Tue, 4 Jun 2013 12:20:43 +0000 (14:20 +0200)]
tty: serial: Enable uartlite for ARM zynq

Enable it in Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: imx: enable the clocks only when the uart is used
Huang Shijie [Tue, 4 Jun 2013 01:59:33 +0000 (09:59 +0800)]
serial: imx: enable the clocks only when the uart is used

Current code opens the clocks when the uart driver is probed.
This will wastes some power if several uarts are enabled, but not really
used.

So close these clocks for uart, and enable the clocks only when
the uart is used.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopcmcia/trivial: at91_cf: fix checkpatch error
Laurent Navet [Thu, 6 Jun 2013 08:24:20 +0000 (10:24 +0200)]
pcmcia/trivial: at91_cf: fix checkpatch error

fix this checkpatch error:
- ERROR: switch and case should be at the same indent

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopcmcia: at91_cf: use module_platform_driver_probe()
Fabio Porcedda [Thu, 6 Jun 2013 08:24:19 +0000 (10:24 +0200)]
pcmcia: at91_cf: use module_platform_driver_probe()

Use module_platform_driver_probe() macro which makes the code smaller
and simpler.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopcmcia: at91_cf: add support for DT
Joachim Eastwood [Thu, 6 Jun 2013 08:24:18 +0000 (10:24 +0200)]
pcmcia: at91_cf: add support for DT

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopcmcia: at91_cf: clean up header includes
Joachim Eastwood [Thu, 6 Jun 2013 08:24:17 +0000 (10:24 +0200)]
pcmcia: at91_cf: clean up header includes

Use includes from linux/ instead of asm/ and remove a
unnecessary mach/ include.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopcmcia: at91_cf: use devm_ functions for allocations
Joachim Eastwood [Thu, 6 Jun 2013 08:24:16 +0000 (10:24 +0200)]
pcmcia: at91_cf: use devm_ functions for allocations

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopcmcia: at91_cf: convert to dev_ print functions
Joachim Eastwood [Thu, 6 Jun 2013 08:24:15 +0000 (10:24 +0200)]
pcmcia: at91_cf: convert to dev_ print functions

Convert all pr_* functions to equivalent dev_* functions and
drop the driver_name variable.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status
Joachim Eastwood [Thu, 6 Jun 2013 08:24:14 +0000 (10:24 +0200)]
pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status

Commit 80af9e6d (pcmcia at91_cf: fix raw gpio number usage) forgot
to change the parameter in gpio_get_value after adding gpio
validation.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@vger.kernel.org> # 3.4+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agouio: uio_pruss: Fix potential NULL pointer dereference
Emil Goode [Thu, 6 Jun 2013 13:55:28 +0000 (15:55 +0200)]
uio: uio_pruss: Fix potential NULL pointer dereference

In function pruss_probe we free gdev and try to use
it on the next line. I have moved the dereference to
above the kfree of gdev.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agovme: Free DMA resource allocation structure
Martyn Welch [Thu, 6 Jun 2013 11:29:16 +0000 (12:29 +0100)]
vme: Free DMA resource allocation structure

There is a memory leak in the function vme_dma_free(). The resource
structure allocated in vme_dma_request() needs to be free'd in
vme_dma_free().

Reported-by: De Roo, Steven <steven.deroo@arcelormittal.com>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers: char: mem: use IS_ERR_VALUE() in memory_lseek()
Rasmus Villemoes [Wed, 5 Jun 2013 17:09:39 +0000 (17:09 +0000)]
drivers: char: mem: use IS_ERR_VALUE() in memory_lseek()

Use IS_ERR_VALUE() instead of comparing the new offset to a hard-coded
value of -MAX_ERRNO (which is also off-by-one due to the use of ~
instead of -).

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopch_phub: fix error return code in pch_phub_probe()
Wei Yongjun [Tue, 4 Jun 2013 14:44:27 +0000 (22:44 +0800)]
pch_phub: fix error return code in pch_phub_probe()

Error code had been assigned to retval in some error handling case
but never use it, 0 is always returned in those case, this patch
fix them to return a negative error code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomisc: replace strict_strtoul() with kstrtoul()
Jingoo Han [Tue, 4 Jun 2013 04:15:16 +0000 (13:15 +0900)]
misc: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agofirmware loader: simplify holding module for request_firmware
Ming Lei [Thu, 6 Jun 2013 12:01:48 +0000 (20:01 +0800)]
firmware loader: simplify holding module for request_firmware

module reference doesn't cover direct loading path, so this patch
simply holds the module in the whole life time of request_firmware()
to fix the problem.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agofirmware loader: don't export cache_firmware and uncache_firmware
Ming Lei [Thu, 6 Jun 2013 12:01:47 +0000 (20:01 +0800)]
firmware loader: don't export cache_firmware and uncache_firmware

Looks no driver has the explict requirement for the two exported
API, just don't export them anymore.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers/base: Use attribute groups to create sysfs memory files
Nathan Fontenot [Tue, 4 Jun 2013 19:42:28 +0000 (14:42 -0500)]
drivers/base: Use attribute groups to create sysfs memory files

Update the sysfs memory code to create/delete files at the time of device
and subsystem registration.

The current code creates files in the root memory directory explicitly through
the use of init_* routines. The files for each memory block are created and
deleted explicitly using the mem_[create|delete]_simple_file macros.

This patch creates attribute groups for the memory root files and files in
each memory block directory so that they are created and deleted implicitly
at subsys and device register and unregister time.

This did necessitate moving the register_memory() updating it to set the
dev.groups field.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agofirmware loader: fix compile warning
Ming Lei [Thu, 6 Jun 2013 11:52:54 +0000 (19:52 +0800)]
firmware loader: fix compile warning

The commit ddf1f0648e8c("firmware loader: fix build failure
with !CONFIG_FW_LOADER_USER_HELPER") introduces the below
warning:

drivers/base/firmware_class.c:921:13: warning:
'kill_requests_without_uevent' defined but not used [-Wunused-function]

So fix it by defining kill_requests_without_uevent() only if
CONFIG_PM_SLEEP is set.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: wusbcore: add HWA-specific fields to usb_rpipe_descriptor
Thomas Pugliese [Thu, 6 Jun 2013 19:06:01 +0000 (14:06 -0500)]
USB: wusbcore: add HWA-specific fields to usb_rpipe_descriptor

This patch adds the HWA specific members to struct usb_rpipe_descriptor
and sets them correctly based on the wireless endpoint compananion
descriptor.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agowusbhc: disable suspend and resume on the root hub.
Thomas Pugliese [Thu, 6 Jun 2013 18:42:54 +0000 (13:42 -0500)]
wusbhc: disable suspend and resume on the root hub.

Suspend and resume are not currently supported on the wireless root hub.
Remove the suspend and resume op functions in the host controller driver
to avoid constant error messages in the system log.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: fix PTR_ERR translation in init_usb_class()
Alexey Khoroshilov [Wed, 5 Jun 2013 21:27:15 +0000 (01:27 +0400)]
USB: fix PTR_ERR translation in init_usb_class()

There is a misprint in init_usb_class():
IS_ERR is used to get error code instead of PTR_ERR.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agozram: use atomic64_xxx() to replace zram_stat64_xxx()
Jiang Liu [Thu, 6 Jun 2013 16:07:31 +0000 (00:07 +0800)]
zram: use atomic64_xxx() to replace zram_stat64_xxx()

Use atomic64_xxx() to replace open-coded zram_stat64_xxx().
Some architectures have native support of atomic64 operations,
so we can get rid of the spin_lock() in zram_stat64_xxx().
On the other hand, for platforms use generic version of atomic64
implement, it may cause an extra save/restore of the interrupt
flag.  So it's a tradeoff.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>