OSDN Git Service

android-x86/kernel.git
9 years agoMerge branch 'topic/pci-cleanup' into for-next
Takashi Iwai [Wed, 7 Jan 2015 14:54:25 +0000 (15:54 +0100)]
Merge branch 'topic/pci-cleanup' into for-next

9 years agoALSA: fm801: move to pcim_* and devm_* functions
Andy Shevchenko [Tue, 6 Jan 2015 23:40:17 +0000 (01:40 +0200)]
ALSA: fm801: move to pcim_* and devm_* functions

The managed functions allow to get ->probe() and ->remove() simplier.
This patch converts code to use managed functions.

While here remove the dead code and fix the value printed in error
message.

[removed pci_release_regions() as it's managed in pcim_release(), too
  -- tiwai]

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Debug output which type of fixup was selected
David Henningsson [Wed, 7 Jan 2015 13:41:59 +0000 (14:41 +0100)]
ALSA: hda - Debug output which type of fixup was selected

Our fixup system is becoming increasingly complex, so it's becoming
time consuming to figure out which way the fix was applied.
This patch adds a few debug prints to aid when debugging why a specific
fixup was selected.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Print codec->chip_name in autoconfig
David Henningsson [Wed, 7 Jan 2015 13:41:58 +0000 (14:41 +0100)]
ALSA: hda - Print codec->chip_name in autoconfig

This will help end users figure out what HDA codec they have.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: sound/atmel/ac97c.c: Add device tree support
Alexander Stein [Mon, 29 Dec 2014 12:08:39 +0000 (13:08 +0100)]
ALSA: sound/atmel/ac97c.c: Add device tree support

This adds device tree support for the AC97 controller. It uses the
soc-ac97link bindings, but actually only ac97-reset is used.

Signed-off-by: Alexander Stein <alexanders83@web.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoLinux 3.19-rc3
Linus Torvalds [Tue, 6 Jan 2015 01:05:20 +0000 (17:05 -0800)]
Linux 3.19-rc3

9 years agoMerge tag 'powerpc-3.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Linus Torvalds [Mon, 5 Jan 2015 22:49:02 +0000 (14:49 -0800)]
Merge tag 'powerpc-3.19-3' of git://git./linux/kernel/git/mpe/linux

Pull powerpc fixes from Michael Ellerman:

 - Wire up sys_execveat(). Tested on 32 & 64 bit.

 - Fix for kdump on LE systems with cpus hot unplugged.

 - Revert Anton's fix for "kernel BUG at kernel/smpboot.c:134!", this
   broke other platforms, we'll do a proper fix for 3.20.

* tag 'powerpc-3.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
  Revert "powerpc: Secondary CPUs must set cpu_callin_map after setting active and online"
  powerpc/kdump: Ignore failure in enabling big endian exception during crash
  powerpc: Wire up sys_execveat() syscall

9 years agoMerge tag 'please-pull-syscall' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 5 Jan 2015 22:31:20 +0000 (14:31 -0800)]
Merge tag 'please-pull-syscall' of git://git./linux/kernel/git/aegl/linux

Pull ia64 fixlet from Tony Luck:
 "Add execveat syscall"

* tag 'please-pull-syscall' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  [IA64] Enable execveat syscall for ia64

9 years ago[IA64] Enable execveat syscall for ia64
Tony Luck [Mon, 5 Jan 2015 19:25:19 +0000 (11:25 -0800)]
[IA64] Enable execveat syscall for ia64

See commit 51f39a1f0cea1cacf8c787f652f26dfee9611874
    syscalls: implement execveat() system call

Signed-off-by: Tony Luck <tony.luck@intel.com>
9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Linus Torvalds [Sun, 4 Jan 2015 19:46:43 +0000 (11:46 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rw/uml

Pull UML fixes from Richard Weinberger:
 "Two fixes for UML regressions. Nothing exciting"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  x86, um: actually mark system call tables readonly
  um: Skip futex_atomic_cmpxchg_inatomic() test

9 years agoRevert "ARM: 7830/1: delay: don't bother reporting bogomips in /proc/cpuinfo"
Pavel Machek [Sun, 4 Jan 2015 19:01:23 +0000 (20:01 +0100)]
Revert "ARM: 7830/1: delay: don't bother reporting bogomips in /proc/cpuinfo"

Commit 9fc2105aeaaf ("ARM: 7830/1: delay: don't bother reporting
bogomips in /proc/cpuinfo") breaks audio in python, and probably
elsewhere, with message

  FATAL: cannot locate cpu MHz in /proc/cpuinfo

I'm not the first one to hit it, see for example

  https://theredblacktree.wordpress.com/2014/08/10/fatal-cannot-locate-cpu-mhz-in-proccpuinfo/
  https://devtalk.nvidia.com/default/topic/765800/workaround-for-fatal-cannot-locate-cpu-mhz-in-proc-cpuinf/?offset=1

Reading original changelog, I have to say "Stop breaking working setups.
You know who you are!".

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoALSA: Deletion of checks before the function call "iounmap"
Markus Elfring [Sat, 3 Jan 2015 21:55:54 +0000 (22:55 +0100)]
ALSA: Deletion of checks before the function call "iounmap"

The iounmap() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: sb: Delete an unnecessary check before the function call "snd_emux_free"
Markus Elfring [Sat, 3 Jan 2015 20:02:32 +0000 (21:02 +0100)]
ALSA: sb: Delete an unnecessary check before the function call "snd_emux_free"

The snd_emux_free() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: aoa: Delete an unnecessary check before the function call "snd_pcm_suspend_all"
Markus Elfring [Sat, 3 Jan 2015 19:43:01 +0000 (20:43 +0100)]
ALSA: aoa: Delete an unnecessary check before the function call "snd_pcm_suspend_all"

The snd_pcm_suspend_all() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: emux: Delete an unnecessary check before the function call "snd_sf_free"
Markus Elfring [Sat, 3 Jan 2015 17:28:21 +0000 (18:28 +0100)]
ALSA: emux: Delete an unnecessary check before the function call "snd_sf_free"

The snd_sf_free() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxygen: Delete an unnecessary check before the function call "snd_pcm_suspend"
Markus Elfring [Sat, 3 Jan 2015 16:37:28 +0000 (17:37 +0100)]
ALSA: oxygen: Delete an unnecessary check before the function call "snd_pcm_suspend"

The snd_pcm_suspend() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: emu10k1: Delete an unnecessary check before the function call "kfree"
Markus Elfring [Sat, 3 Jan 2015 16:06:04 +0000 (17:06 +0100)]
ALSA: emu10k1: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agosound: oss: Deletion of unnecessary checks before the function call "vfree"
Markus Elfring [Sat, 3 Jan 2015 14:10:52 +0000 (15:10 +0100)]
sound: oss: Deletion of unnecessary checks before the function call "vfree"

The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: seq: Deletion of unnecessary checks before the function call "snd_midi_event_free"
Markus Elfring [Sat, 3 Jan 2015 13:54:56 +0000 (14:54 +0100)]
ALSA: seq: Deletion of unnecessary checks before the function call "snd_midi_event_free"

The snd_midi_event_free() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agox86, um: actually mark system call tables readonly
Daniel Borkmann [Sat, 3 Jan 2015 12:11:10 +0000 (13:11 +0100)]
x86, um: actually mark system call tables readonly

Commit a074335a370e ("x86, um: Mark system call tables readonly") was
supposed to mark the sys_call_table in UML as RO by adding the const,
but it doesn't have the desired effect as it's nevertheless being placed
into the data section since __cacheline_aligned enforces sys_call_table
being placed into .data..cacheline_aligned instead. We need to use
the ____cacheline_aligned version instead to fix this issue.

Before:

$ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
                 U sys_writev
0000000000000000 D sys_call_table
0000000000000000 D syscall_table_size

After:

$ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
                 U sys_writev
0000000000000000 R sys_call_table
0000000000000000 D syscall_table_size

Fixes: a074335a370e ("x86, um: Mark system call tables readonly")
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
9 years agoum: Skip futex_atomic_cmpxchg_inatomic() test
Richard Weinberger [Wed, 10 Dec 2014 12:53:51 +0000 (13:53 +0100)]
um: Skip futex_atomic_cmpxchg_inatomic() test

futex_atomic_cmpxchg_inatomic() does not work on UML because
it triggers a copy_from_user() in kernel context.
On UML copy_from_user() can only be used if the kernel was called
by a real user space process such that UML can use ptrace()
to fetch the value.

Reported-by: Miklos Szeredi <miklos@szeredi.hu>
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Tested-by: Daniel Walter <d.walter@0x90.at>
9 years agoALSA: pcm: Remove unused functions declaration
Lars-Peter Clausen [Sat, 3 Jan 2015 16:56:14 +0000 (17:56 +0100)]
ALSA: pcm: Remove unused functions declaration

Remove function declarations for functions that don't have a matching
implementation.

For snd_pcm_build_linear_format the implementation was removed in
64d27f96cb719cf8 ("[ALSA] Support 3-bytes 24bit format in PCM OSS
emulation"). All the others never had one (as far as git history goes).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 2 Jan 2015 21:24:41 +0000 (13:24 -0800)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of three fixes: one to correct an abort path thinko
  causing failures (and a panic) in USB on device misbehaviour, One to
  fix an out of order issue in the fnic driver and one to match discard
  expectations to qemu which otherwise cause Linux to behave badly as a
  guest"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  SCSI: fix regression in scsi_send_eh_cmnd()
  fnic: IOMMU Fault occurs when IO and abort IO is out of order
  sd: tweak discard heuristics to work around QEMU SCSI issue

9 years agoMerge tag 'sound-3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 2 Jan 2015 20:57:20 +0000 (12:57 -0800)]
Merge tag 'sound-3.19-rc3' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Nothing too exciting as a new year's start here: most of fixes are for
  ASoC, a boot crash fix on OMAP for deferred probe, a few driver
  specific fixes (Intel, dwc, rockchip, rt5677), in addition to typo
  fixes in kerneldoc comments for PCM"

* tag 'sound-3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: pcm: Fix kerneldoc for params_*() functions
  ASoC: rockchip: i2s: fix maxburst of dma data to 4
  ASoC: rockchip: i2s: fix error defination of transmit data level
  ASoC: Intel: correct the fixed free block allocation
  ASoC: rt5677: fixed rt5677_dsp_vad_put rt5677_dsp_vad_get panic
  ASoC: Intel: Fix BYTCR machine driver MODULE_ALIAS
  ASoC: Intel: Fix BYTCR firmware name
  ASoC: dwc: Iterate over all channels
  ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap
  ASoC: Intel: Add I2C dependency to two new machines
  ASoC: dapm: Remove snd_soc_of_parse_audio_routing() due to deferred probe

9 years agoMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Fri, 2 Jan 2015 20:07:50 +0000 (12:07 -0800)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost

Pull vhost cleanup and virtio bugfix
 "There's a single change here, fixing a vhost bug where vhost
  initialization fails due to used ring alignment check being too
  strict"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vhost: relax used address alignment
  virtio_ring: document alignment requirements

9 years agoALSA: ps3: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
Lars-Peter Clausen [Fri, 2 Jan 2015 14:03:43 +0000 (15:03 +0100)]
ALSA: ps3: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()

The ALSA core takes care that all preallocated memory is freed when the card
(and the PCM) itself is freed. There is no need to do this manually in the
driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxygen: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
Lars-Peter Clausen [Fri, 2 Jan 2015 14:03:42 +0000 (15:03 +0100)]
ALSA: oxygen: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()

The ALSA core takes care that all preallocated memory is freed when the PCM
itself is freed. There is no need to do this manually in the driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ymfpci: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:55 +0000 (12:24 +0100)]
ALSA: ymfpci: Remove always NULL parameters

The various PCM allocation functions in this driver take a pointer to a
pointer of a PCM where if this parameter is provided the newly allocated PCM
is stored. All callers pass NULL though, so remove the parameter. This makes
the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: trident: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:54 +0000 (12:24 +0100)]
ALSA: trident: Remove always NULL parameters

The various PCM allocation functions in this driver take a pointer to a
pointer of a PCM where if this parameter is provided the newly allocated PCM
is stored. All callers pass NULL though, so remove the parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: sonicvibes: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:53 +0000 (12:24 +0100)]
ALSA: sonicvibes: Remove always NULL parameter

snd_sonicvibes_pcm() take a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: riptide: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:52 +0000 (12:24 +0100)]
ALSA: riptide: Remove always NULL parameter

snd_riptide_pcm() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ice1712: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:51 +0000 (12:24 +0100)]
ALSA: ice1712: Remove always NULL parameters

The various PCM allocation functions in this driver take a pointer to a
pointer of a PCM where if this parameter is provided the newly allocated PCM
is stored. All callers pass NULL though, so remove the parameter. This makes
the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:50 +0000 (12:24 +0100)]
ALSA: fm801: Remove always NULL parameter

snd_fm801_pcm() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: emu10k1: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:49 +0000 (12:24 +0100)]
ALSA: emu10k1: Remove always NULL parameters

The various PCM and hwdep allocation functions in this driver take a pointer
to a pointer of a PCM/hwdep where if this parameter is provided the newly
allocated object is stored. All callers pass NULL though, so remove the
parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ens1370: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:48 +0000 (12:24 +0100)]
ALSA: ens1370: Remove always NULL parameters

The various PCM and MIDI allocation functions in this driver take a pointer
to a pointer of a PCM/MIDI object where if this parameter is provided the
newly allocated object is stored. All callers pass NULL though, so remove
the parameter. This makes the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: cs46xx: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:47 +0000 (12:24 +0100)]
ALSA: cs46xx: Remove always NULL parameters

The various PCM and MIDI allocation functions in this driver take a pointer
to a pointer of a PCM/MIDI object where if this parameter is provided the
newly allocated object is stored. All callers pass NULL though, so remove
the parameter. This makes the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: cs4281: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:46 +0000 (12:24 +0100)]
ALSA: cs4281: Remove always NULL parameters

snd_cs4281_pcm() and snd_cs4281_midi() take a pointer to a pointer of a
PCM/MIDI object where if this parameter is provided the newly allocated
object is stored. All callers pass NULL though, so remove the parameter.
This makes the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:45 +0000 (12:24 +0100)]
ALSA: asihpi: Remove always NULL parameter

snd_asihpi_hpi_new() takes a pointer to a pointer of a hwdep where if this
parameter is provided the newly allocated hwdep is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASLA: ad1889: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:44 +0000 (12:24 +0100)]
ASLA: ad1889: Remove always NULL parameter

snd_ad1889_pcm_init() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: wss: Remove (almost) always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:43 +0000 (12:24 +0100)]
ALSA: wss: Remove (almost) always NULL parameters

Most callers of snd_wss_pcm(), snd_wss_timer() and snd_cs4236_pcm() pass
NULL as the last parameter, some callers pass a pointer but never use it
after the function has been called and only a few callers pass a pointer and
actually use it. The later is only the case for snd_wss_pcm() for
snd_cs4236_pcm() and it is possible to get the same PCM object by accessing
the pcm field of the snd_wss struct that was passed as the first parameter.

This function removes the last parameters from the functions mentioned above
and updates the callers which used it to use chip->pcm instead. This allows
us to slightly simplify the functions since they don't have to check and set
the last parameter anymore which makes the code slightly shorter and
cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: sb16: Simplify snd_sb16dsp_pcm()
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:42 +0000 (12:24 +0100)]
ASoC: sb16: Simplify snd_sb16dsp_pcm()

All callers of snd_sb16dsp_pcm() always pass the pcm field of the first
parameter as the last parameter. Simplify the function by moving this inside
the function itself. This makes the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: sb8: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:41 +0000 (12:24 +0100)]
ALSA: sb8: Remove always NULL parameters

snd_sb8dsp_pcm() and snd_sb8dsp_midi() take a pointer to a pointer of a
PCM/MIDI where if this parameter is provided the newly allocated object is
stored. All callers pass NULL though, so remove the parameter. This makes
the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: msnd: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:40 +0000 (12:24 +0100)]
ALSA: msnd: Remove always NULL parameter

snd_msnd_pcm() takes a pointer to a pointer of a PCM where if this parameter
is provided the newly allocated PCM is stored. All callers pass NULL though,
so remove the parameter. This makes the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: gus: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:39 +0000 (12:24 +0100)]
ALSA: gus: Remove always NULL parameters

snd_gf1_pcm_new() and snd_gf1_rawmidi_new() take a pointer to a pointer of a
PCM/MIDI where if this parameter is provided the newly allocated object is
stored. All callers pass NULL though, so remove the parameter. This makes
the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: es18xx: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:38 +0000 (12:24 +0100)]
ALSA: es18xx: Remove always NULL parameter

snd_es18xx_pcm() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: es1688: Remove almost always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:37 +0000 (12:24 +0100)]
ALSA: es1688: Remove almost always NULL parameter

snd_es1688_pcm() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. This PCM is also
available from the pcm field of the snd_es1688 struct that got passed to the
same function. This patch updates all callers which passed a pointer to use
that field instead and then removes the parameter from the function. This
makes the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ad1816a: Remove always NULL parameters
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:36 +0000 (12:24 +0100)]
ALSA: ad1816a: Remove always NULL parameters

snd_ad1816a_pcm() and snd_ad1816a_timer() take a pointer to a pointer of a
PCM/timer where if this parameter is provided the newly allocated object is
stored. All callers pass NULL though, so remove the parameter. This makes
the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ml403-ac97cr: Remove always NULL parameter
Lars-Peter Clausen [Fri, 2 Jan 2015 11:24:35 +0000 (12:24 +0100)]
ALSA: ml403-ac97cr: Remove always NULL parameter

snd_ml403_ac97cr_pcm() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit
Linus Torvalds [Wed, 31 Dec 2014 22:52:18 +0000 (14:52 -0800)]
Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit

Pull audit fix from Paul Moore:
 "One audit patch to resolve a panic/oops when recording filenames in
  the audit log, see the mail archive link below.

  The fix isn't as nice as I would like, as it involves an allocate/copy
  of the filename, but it solves the problem and the overhead should
  only affect users who have configured audit rules involving file
  names.

  We'll revisit this issue with future kernels in an attempt to make
  this suck less, but in the meantime I think this fix should go into
  the next release of v3.19-rcX.

  [ https://marc.info/?t=141986927600001&r=1&w=2 ]"

* 'upstream' of git://git.infradead.org/users/pcmoore/audit:
  audit: create private file name copies when auditing inodes

9 years agoRevert "Input: atmel_mxt_ts - use deep sleep mode when stopped"
Linus Torvalds [Wed, 31 Dec 2014 20:59:34 +0000 (12:59 -0800)]
Revert "Input: atmel_mxt_ts - use deep sleep mode when stopped"

This reverts commit 9d469d033d135d80742a4e39e6bbb4519dd5eee1.

It breaks the Chromebook Pixel touchpad (and touchscreen).

Reported-by: Dirk Hohndel <dirk@hohndel.org>
Bisected-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nick Dyer <nick.dyer@itdev.co.uk>
Cc: Benson Leung <bleung@chromium.org>
Cc: Yufeng Shen <miletus@chromium.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge tag 'nios2-fixes-v3.19-rc3' of git://git.rocketboards.org/linux-socfpga-next
Linus Torvalds [Wed, 31 Dec 2014 17:44:44 +0000 (09:44 -0800)]
Merge tag 'nios2-fixes-v3.19-rc3' of git://git.rocketboards.org/linux-socfpga-next

Pull arch/nios2 fixes from Ley Foon Tan:

 - fix compilation error when enable CONFIG_PREEMPT

 - initialize cpuinfo.mmu variable supplied by the device tree

* tag 'nios2-fixes-v3.19-rc3' of git://git.rocketboards.org/linux-socfpga-next:
  nios2: Use preempt_schedule_irq
  nios2: Initialize cpuinfo.mmu

9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Wed, 31 Dec 2014 17:16:17 +0000 (09:16 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "Fix a use-after-free crash in the user-space crypto API"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: af_alg - fix backlog handling

9 years agoMerge branch 'topic/msbits' into for-next
Takashi Iwai [Wed, 31 Dec 2014 16:13:41 +0000 (17:13 +0100)]
Merge branch 'topic/msbits' into for-next

9 years agoASoC: pcm: Fix unused variable warning
Takashi Iwai [Wed, 31 Dec 2014 16:10:34 +0000 (17:10 +0100)]
ASoC: pcm: Fix unused variable warning

sound/soc/soc-pcm.c: In function ‘soc_pcm_set_msb’:
sound/soc/soc-pcm.c:307:11: warning: unused variable ‘i’ [-Wunused-variable]

Fixes: 0e2a37513a1f ('ASoC: pcm: Use wildcard msbits constraints')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: add SNDRV_PCM_TRIGGER_DRAIN trigger
Libin Yang [Wed, 31 Dec 2014 14:09:54 +0000 (22:09 +0800)]
ALSA: pcm: add SNDRV_PCM_TRIGGER_DRAIN trigger

Add SNDRV_PCM_TRIGGER_DRAIN trigger for pcm drain.

Some audio devices require notification of drain events
in order to properly drain and shutdown an audio stream.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: fix an information leak in asihpi_hpi_ioctl()
Eliot Blennerhassett [Wed, 31 Dec 2014 10:48:32 +0000 (23:48 +1300)]
ALSA: asihpi: fix an information leak in asihpi_hpi_ioctl()

Add missing limits to keep copied data within allocated buffer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agonios2: Use preempt_schedule_irq
Tobias Klauser [Wed, 31 Dec 2014 02:53:11 +0000 (10:53 +0800)]
nios2: Use preempt_schedule_irq

Follow aa0d53260596 ("ia64: Use preempt_schedule_irq") and use
preempt_schedule_irq instead of enabling/disabling interrupts and
messing around with PREEMPT_ACTIVE in the nios2 low-level preemption
code ourselves. Also get rid of the now needless re-check for
TIF_NEED_RESCHED, preempt_schedule_irq will already take care of
rescheduling.

This also fixes the following build error when building with
CONFIG_PREEMPT:

arch/nios2/kernel/built-in.o: In function `need_resched':
arch/nios2/kernel/entry.S:374: undefined reference to `PREEMPT_ACTIVE'

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: Initialize cpuinfo.mmu
Walter Goossens [Wed, 31 Dec 2014 01:29:07 +0000 (09:29 +0800)]
nios2: Initialize cpuinfo.mmu

This patch initializes the mmu field of the cpuinfo structure to the
value supplied by the devicetree.

Signed-off-by: Walter Goossens <waltergoossens@home.nl>
Acked-by: Ley Foon Tan <lftan@altera.com>
9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Wed, 31 Dec 2014 01:13:13 +0000 (17:13 -0800)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "A very small set of fixes for 3.19, as everyone was out.

  The clocksource patch was something I missed for the merge window
  after the change that broke arm64 was merged through arm-soc.  The
  other two patches are a fix for an undetected merge problem in mvebu
  and a defconfig change to make some exynos boards work with the normal
  multi_v7_defconfig"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  Add USB_EHCI_EXYNOS to multi_v7_defconfig
  ARM: mvebu: Fix pinctrl configuration for Armada 370 DB
  clocksource: arch_timer: Only use the virtual counter (CNTVCT) on arm64

9 years agoMerge tag 'fbdev-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba...
Linus Torvalds [Wed, 31 Dec 2014 01:04:56 +0000 (17:04 -0800)]
Merge tag 'fbdev-fixes-3.19' of git://git./linux/kernel/git/tomba/linux

Pull fbdev fixes from Tomi Valkeinen:

 - Fix regression with Nokia N900 display

 - Fix crash on fbdev using freed __initdata logos

 - Fix fb_deferred_io_fsync() return value.

* tag 'fbdev-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  OMAPDSS: SDI: fix output port_num
  video/fbdev: fix defio's fsync
  video/logo: prevent use of logos after they have been freed
  OMAPDSS: pll: NULL dereference in error handling
  OMAPDSS: HDMI: remove double initializer entries

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Wed, 31 Dec 2014 00:59:59 +0000 (16:59 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input layer fixes from Dmitry Torokhov:
 "Fixes for v7 protocol for ALPS devices and few other driver fixes.

  Also users can request input events to be stamped with boot time
  timestamps, in addition to real and monotonic timestamps"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: hil_kbd - fix incorrect use of init_completion
  Input: alps - v7: document the v7 touchpad packet protocol
  Input: alps - v7: fix finger counting for > 2 fingers on clickpads
  Input: alps - v7: sometimes a single touch is reported in mt[1]
  Input: alps - v7: ignore new packets
  Input: evdev - add CLOCK_BOOTTIME support
  Input: psmouse - expose drift duration for IBM trackpoints
  Input: stmpe - bias keypad columns properly
  Input: stmpe - enforce device tree only mode
  mfd: stmpe: add pull up/down register offsets for STMPE
  Input: optimize events_per_packet count calculation
  Input: edt-ft5x06 - fixed a macro coding style issue
  Input: gpio_keys - replace timer and workqueue with delayed workqueue
  Input: gpio_keys - allow separating gpio and irq in device tree

9 years agoRevert "cfg80211: make WEXT compatibility unselectable"
Jiri Kosina [Tue, 30 Dec 2014 22:52:20 +0000 (23:52 +0100)]
Revert "cfg80211: make WEXT compatibility unselectable"

This reverts commit 24a0aa212ee2dbe44360288684478d76a8e20a0a.

It's causing severe userspace breakage.  Namely, all the utilities from
wireless-utils which are relying on CONFIG_WEXT (which means tools like
'iwconfig', 'iwlist', etc) are not working anymore.  There is a 'iw'
utility in newer wireless-tools, which is supposed to be a replacement
for all the "deprecated" binaries, but it's far away from being
massively adopted.

Please see [1] for example of the userspace breakage this is causing.

In addition to that, Larry Finger reports [2] that this patch is also
causing ipw2200 driver being impossible to build.

To me this clearly shows that CONFIG_WEXT is far, far away from being
"deprecated enough" to be removed.

[1] http://thread.gmane.org/gmane.linux.kernel/1857010
[2] http://thread.gmane.org/gmane.linux.network/343688

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Tue, 30 Dec 2014 18:45:47 +0000 (10:45 -0800)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix double SKB free in bluetooth 6lowpan layer, from Jukka Rissanen.

 2) Fix receive checksum handling in enic driver, from Govindarajulu
    Varadarajan.

 3) Fix NAPI poll list corruption in virtio_net and caif_virtio, from
    Herbert Xu.  Also, add code to detect drivers that have this mistake
    in the future.

 4) Fix doorbell endianness handling in mlx4 driver, from Amir Vadai.

 5) Don't clobber IP6CB() before xfrm6_policy_check() is called in TCP
    input path,f rom Nicolas Dichtel.

 6) Fix MPLS action validation in openvswitch, from Pravin B Shelar.

 7) Fix double SKB free in vxlan driver, also from Pravin.

 8) When we scrub a packet, which happens when we are switching the
    context of the packet (namespace, etc.), we should reset the
    secmark.  From Thomas Graf.

 9) ->ndo_gso_check() needs to do more than return true/false, it also
    has to allow the driver to clear netdev feature bits in order for
    the caller to be able to proceed properly.  From Jesse Gross.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (62 commits)
  genetlink: A genl_bind() to an out-of-range multicast group should not WARN().
  netlink/genetlink: pass network namespace to bind/unbind
  ne2k-pci: Add pci_disable_device in error handling
  bonding: change error message to debug message in __bond_release_one()
  genetlink: pass multicast bind/unbind to families
  netlink: call unbind when releasing socket
  netlink: update listeners directly when removing socket
  genetlink: pass only network namespace to genl_has_listeners()
  netlink: rename netlink_unbind() to netlink_undo_bind()
  net: Generalize ndo_gso_check to ndo_features_check
  net: incorrect use of init_completion fixup
  neigh: remove next ptr from struct neigh_table
  net: xilinx: Remove unnecessary temac_property in the driver
  net: phy: micrel: use generic config_init for KSZ8021/KSZ8031
  net/core: Handle csum for CHECKSUM_COMPLETE VXLAN forwarding
  openvswitch: fix odd_ptr_err.cocci warnings
  Bluetooth: Fix accepting connections when not using mgmt
  Bluetooth: Fix controller configuration with HCI_QUIRK_INVALID_BDADDR
  brcmfmac: Do not crash if platform data is not populated
  ipw2200: select CFG80211_WEXT
  ...

9 years agoMerge tag 'linux-kselftest-3.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 30 Dec 2014 18:36:59 +0000 (10:36 -0800)]
Merge tag 'linux-kselftest-3.19-fixes' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull kselftest fix from Shuah Khan:
 "Fix exec test compile warnings"

* tag 'linux-kselftest-3.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests/exec: Use %zu to format size_t

9 years agoSCSI: fix regression in scsi_send_eh_cmnd()
Alan Stern [Fri, 21 Nov 2014 15:44:49 +0000 (10:44 -0500)]
SCSI: fix regression in scsi_send_eh_cmnd()

Commit ac61d1955934 (scsi: set correct completion code in
scsi_send_eh_cmnd()) introduced a bug.  It changed the stored return
value from a queuecommand call, but it didn't take into account that
the return value was used again later on.  This patch fixes the bug by
changing the later usage.

There is a big comment in the middle of scsi_send_eh_cmnd() which
does a good job of explaining how the routine works.  But it mentions
a "rtn = FAILURE" value that doesn't exist in the code.  This patch
adjusts the code to match the comment (I assume the comment is right
and the code is wrong).

This fixes Bugzilla #88341.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Андрей Аладьев <aladjev.andrew@gmail.com>
Tested-by: Андрей Аладьев <aladjev.andrew@gmail.com>
Fixes: ac61d19559349e205dad7b5122b281419aa74a82
Acked-by: Hannes Reinecke <hare@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
9 years agoMerge branch 'topic/pcm-params' into for-next
Takashi Iwai [Tue, 30 Dec 2014 15:42:07 +0000 (16:42 +0100)]
Merge branch 'topic/pcm-params' into for-next

9 years agoALSA: pcm: Replace custom ld2 function with __fls
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:46 +0000 (19:41 +0100)]
ALSA: pcm: Replace custom ld2 function with __fls

__fls has the same semantics as ld2, so there is no need to re-implement it.
Furthermore a lot of architectures have custom implementations of __fls that
are able to use special hardware instructions to compute the result. This
makes the code slightly shorter and faster.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: snd_pcm_oss_period_size: Use round{up,down}_pow_of_two()
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:45 +0000 (19:41 +0100)]
ALSA: snd_pcm_oss_period_size: Use round{up,down}_pow_of_two()

Instead of opencoding them use the standard roundup_pow_of_two() and
rounddown_pow_of_two() helper functions. This gets rids one of the few users
of the custom ld2() function and also makes it a bit more obvious what the
code does.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Use __ffs() instead of ffs() in snd_mask_min()
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:44 +0000 (19:41 +0100)]
ALSA: pcm: Use __ffs() instead of ffs() in snd_mask_min()

The difference between __ffs and ffs is that ffs will return a one based
index whereas __ffs will return a zero based index. Furthermore ffs will
check if the passed value is zero and return zero in that case, whereas
__ffs behavior is undefined if the passed parameter is 0.

Since we already check if the mask is 0 before calling ffs and also subtract
1 from the result __ffs is the better choice.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Simplify params_period_bytes()
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:43 +0000 (19:41 +0100)]
ALSA: pcm: Simplify params_period_bytes()

The hw_params struct has a parameter that contains the period size in bytes.
This can be used instead of deriving the value from other parameters. This
is similar to e.g. params_buffer_bytes()

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Add kernel doc for params_*() functions
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:42 +0000 (19:41 +0100)]
ALSA: pcm: Add kernel doc for params_*() functions

Add kernel doc for the remaining undocumented params_*() functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Convert params_* mask helpers to static inline functions
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:41 +0000 (19:41 +0100)]
ALSA: pcm: Convert params_* mask helpers to static inline functions

Use static inline functions instead of macros for the remaining params_*()
helpers that have not been converted yet. This is slightly cleaner and
offers better type safety.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Remove unused SNDRV_PCM_IOCTL1_{FALSE,TRUE} defines
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:39 +0000 (19:41 +0100)]
ALSA: pcm: Remove unused SNDRV_PCM_IOCTL1_{FALSE,TRUE} defines

Both SNDRV_PCM_IOCTL1_FALSE and SNDRV_PCM_IOCTL1_TRUE are unused and have in
fact never been used (at least as far as the git history goes).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm_params: Remove unused add/sub functions
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:38 +0000 (19:41 +0100)]
ALSA: pcm_params: Remove unused add/sub functions

Those two functions are not used anywhere and also their name is a bit to
generic to be in a global header, so remove them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Fix kerneldoc for params_*() functions
Lars-Peter Clausen [Mon, 29 Dec 2014 18:41:40 +0000 (19:41 +0100)]
ALSA: pcm: Fix kerneldoc for params_*() functions

Fix a copy and paste error in the kernel doc description for the params_*()
functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'topic/msbits' into for-next
Takashi Iwai [Tue, 30 Dec 2014 15:40:46 +0000 (16:40 +0100)]
Merge branch 'topic/msbits' into for-next

9 years agoASoC: pcm: Use wildcard msbits constraints
Lars-Peter Clausen [Mon, 29 Dec 2014 17:43:38 +0000 (18:43 +0100)]
ASoC: pcm: Use wildcard msbits constraints

Use the new wildcard msbits constraints instead of installing a constraint
for each available sample format width.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: Add support for wildcard msbits constraints
Lars-Peter Clausen [Mon, 29 Dec 2014 17:43:37 +0000 (18:43 +0100)]
ALSA: Add support for wildcard msbits constraints

Currently the msbits constraints requires to specify a specific sample
format width for which the constraint should be applied. But often the
number of most significant bits is not sample format specific, but rather a
absolute limit. E.g. the PCM interface might accept 32-bit and 24-bit
samples, but the DAC has a 16-bit resolution and throws away the LSBs. In
this case for both 32-bit and 24-bit format msbits should be set to 16. This
patch extends snd_pcm_hw_constraint_msbits() so that a wildcard constraint
can be setup that is applied for all formats with a sample width larger than
the specified msbits. Choosing the wildcard constraint is done by setting
the sample width parameter of the function to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: Fix handling of multiple msbits constraints on the same runtime
Lars-Peter Clausen [Mon, 29 Dec 2014 17:43:36 +0000 (18:43 +0100)]
ALSA: Fix handling of multiple msbits constraints on the same runtime

If the sound card is made up of discrete components, each with their own
driver (e.g. like in the ASoC case), we might end up with multiple msbits
constraint rules installed. Currently this will result in msbits being set
to whatever the last rule set it to.

This patch updates the behavior of the rule to choose the minimum (other
than zero) of all the installed rules.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'asoc-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Tue, 30 Dec 2014 15:22:11 +0000 (16:22 +0100)]
Merge tag 'asoc-v3.19-rc2' of git://git./linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.20

Nothing too exciting here yet, a small optimization for DAPM from
Lars-Peter and a few small bits and pieces for drivers but nothing
that really stands out.

9 years agoMerge tag 'asoc-fix-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broon...
Takashi Iwai [Tue, 30 Dec 2014 15:17:13 +0000 (16:17 +0100)]
Merge tag 'asoc-fix-v3.19-rc2' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.19

A few fixes for v3.19, a few driver specifics and one core fix which
fixes a boot crash on OMAP if deferred probing kicks in due to
attempting to modify static data.

9 years agoAdd USB_EHCI_EXYNOS to multi_v7_defconfig
Steev Klimaszewski [Tue, 30 Dec 2014 06:55:48 +0000 (00:55 -0600)]
Add USB_EHCI_EXYNOS to multi_v7_defconfig

Currently we enable Exynos devices in the multi v7 defconfig, however, when
testing on my ODROID-U3, I noticed that USB was not working.  Enabling this
option causes USB to work, which enables networking support as well since the
ODROID-U3 has networking on the USB bus.

[arnd] Support for odroid-u3 was added in 3.10, so it would be nice to
backport this fix at least that far.

Signed-off-by: Steev Klimaszewski <steev@gentoo.org>
Cc: stable@vger.kernel.org # 3.10
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'mvebu-fixes-3.19' of git://git.infradead.org/linux-mvebu into fixes
Arnd Bergmann [Tue, 30 Dec 2014 10:17:07 +0000 (11:17 +0100)]
Merge tag 'mvebu-fixes-3.19' of git://git.infradead.org/linux-mvebu into fixes

Pull "Fixes for 3.19" from Andrew Lunn:

Jason is taking a back seat this cycle and i'm doing all the patch
wrangling for mvebu.

* tag 'mvebu-fixes-3.19' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: Fix pinctrl configuration for Armada 370 DB

Also update to Linux 3.19-rc1, which this was based on.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoaudit: create private file name copies when auditing inodes
Paul Moore [Tue, 30 Dec 2014 14:26:21 +0000 (09:26 -0500)]
audit: create private file name copies when auditing inodes

Unfortunately, while commit 4a928436 ("audit: correctly record file
names with different path name types") fixed a problem where we were
not recording filenames, it created a new problem by attempting to use
these file names after they had been freed.  This patch resolves the
issue by creating a copy of the filename which the audit subsystem
frees after it is done with the string.

At some point it would be nice to resolve this issue with refcounts,
or something similar, instead of having to allocate/copy strings, but
that is almost surely beyond the scope of a -rcX patch so we'll defer
that for later.  On the plus side, only audit users should be impacted
by the string copying.

Reported-by: Toralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: Paul Moore <pmoore@redhat.com>
9 years agofnic: IOMMU Fault occurs when IO and abort IO is out of order
Anil Chintalapati (achintal) [Tue, 23 Dec 2014 19:40:00 +0000 (19:40 +0000)]
fnic: IOMMU Fault occurs when IO and abort IO is out of order

When I/O is aborted by mid-layer, fnic FW will complete the I/O before
completing the abort task. In some cases abort request is completed before
the I/O, which could lead to inconsistent driver and firmware states.
In this case firmware reset would clear the inconsistent state.

Signed-off-by: Anil Chintalapati <achintal@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Hiral Shah <hishah@cisco.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
9 years agosd: tweak discard heuristics to work around QEMU SCSI issue
Martin K. Petersen [Fri, 5 Dec 2014 13:58:03 +0000 (08:58 -0500)]
sd: tweak discard heuristics to work around QEMU SCSI issue

7985090aa020 changed the discard heuristics to give preference to the
WRITE SAME commands that (unlike UNMAP) guarantee deterministic results.

Ming Lei discovered that QEMU SCSI's WRITE SAME implementation
internally relied on limits that were only communicated for the UNMAP
case. And therefore discard commands backed by WRITE SAME would fail.

Tweak the heuristics so we still pick UNMAP in the LBPRZ=0 case and only
prefer the WRITE SAME variants if the device has the LBPRZ flag set.

Reported-by: Ming Lei <ming.lei@canonical.com>
Tested-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
9 years agoOMAPDSS: SDI: fix output port_num
Tomi Valkeinen [Mon, 29 Dec 2014 07:57:11 +0000 (09:57 +0200)]
OMAPDSS: SDI: fix output port_num

After the commit ef691ff48bc8 (OMAPDSS: DT: Get source endpoint by
matching reg-id) we look for the SDI output using the port number.
However, the SDI driver doesn't set the port number, which causes the
SDI display to not initialize.

Fix this by setting the SDI port number to 1. We use a hardcoded value,
as SDI was used only on OMAP3 and it's always port number 1 there.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
9 years agovideo/fbdev: fix defio's fsync
Tomi Valkeinen [Fri, 19 Dec 2014 11:55:41 +0000 (13:55 +0200)]
video/fbdev: fix defio's fsync

fb_deferred_io_fsync() returns the value of schedule_delayed_work() as
an error code, but schedule_delayed_work() does not return an error. It
returns true/false depending on whether the work was already queued.

Fix this by ignoring the return value of schedule_delayed_work().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: stable@vger.kernel.org
9 years agoMerge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Tue, 30 Dec 2014 05:09:57 +0000 (21:09 -0800)]
Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "A set of three minor cifs fixes"

* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: make new inode cache when file type is different
  Fix signed/unsigned pointer warning
  Convert MessageID in smb2_hdr to LE

9 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Linus Torvalds [Tue, 30 Dec 2014 04:43:10 +0000 (20:43 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs

Pull UDF & isofs fixes from Jan Kara:
 "A couple of UDF fixes of handling of corrupted media and one iso9660
  fix of the same"

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  udf: Reduce repeated dereferences
  udf: Check component length before reading it
  udf: Check path length when reading symlink
  udf: Verify symlink size before loading it
  udf: Verify i_size when loading inode
  isofs: Fix unchecked printing of ER records

9 years agoMerge tag 'pm+acpi-3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Tue, 30 Dec 2014 02:50:02 +0000 (18:50 -0800)]
Merge tag 'pm+acpi-3.19-rc3' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management and ACPI material from Rafael J Wysocki:
 "These are fixes (operating performance points library, cpufreq-dt
  driver, cpufreq core, ACPI backlight, cpupower tool), cleanups
  (cpuidle), new processor IDs for the RAPL (Running Average Power
  Limit) power capping driver, and a modification of the generic power
  domains framework allowing modular drivers to call one of its helper
  functions.

  Specifics:

   - Fix for a potential NULL pointer dereference in the cpufreq core
     due to an initialization race condition (Ethan Zhao).

   - Fixes for abuse of the OPP (Operating Performance Points) API
     related to RCU and other minor issues in the OPP library and the
     cpufreq-dt driver (Dmitry Torokhov).

   - cpuidle governors cleanup making them measure idle duration in a
     better way without using the CPUIDLE_FLAG_TIME_INVALID flag which
     allows that flag to be dropped from the ACPI cpuidle driver and
     from the core too (Len Brown).

   - New ACPI backlight blacklist entries for Samsung machines without a
     working native backlight interface that need to use the ACPI
     backlight instead (Aaron Lu).

   - New CPU IDs of future Intel Xeon CPUs for the Intel RAPL power
     capping driver (Jacob Pan).

   - Generic power domains framework modification to export the
     of_genpd_get_from_provider() function to modular drivers that will
     allow future driver modifications to be based on the mainline (Amit
     Daniel Kachhap).

   - Two fixes for the cpupower tool (Michal Privoznik, Prarit
     Bhargava)"

* tag 'pm+acpi-3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / video: Add some Samsung models to disable_native_backlight list
  tools / cpupower: Fix no idle state information return value
  tools / cpupower: Correctly detect if running as root
  cpufreq: fix a NULL pointer dereference in __cpufreq_governor()
  cpufreq-dt: defer probing if OPP table is not ready
  PM / OPP: take RCU lock in dev_pm_opp_get_opp_count
  PM / OPP: fix warning in of_free_opp_table()
  PM / OPP: add some lockdep annotations
  powercap / RAPL: add IDs for future Xeon CPUs
  PM / Domains: Export of_genpd_get_from_provider function
  cpuidle / ACPI: remove unused CPUIDLE_FLAG_TIME_INVALID
  cpuidle: ladder: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID
  cpuidle: menu: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID

9 years agogenetlink: A genl_bind() to an out-of-range multicast group should not WARN().
David S. Miller [Mon, 29 Dec 2014 21:31:49 +0000 (16:31 -0500)]
genetlink: A genl_bind() to an out-of-range multicast group should not WARN().

Users can request to bind to arbitrary multicast groups, so warning
when the requested group number is out of range is not appropriate.

And with the warning removed, and the 'err' variable properly given
an initial value, we can remove 'found' altogether.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge tag 'spi-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Mon, 29 Dec 2014 21:30:50 +0000 (13:30 -0800)]
Merge tag 'spi-v3.19-rc2' of git://git./linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few driver specific fixes here, the DMA burst size increase in the
  spfi driver is a fix to make the hardware happier in some situations"

* tag 'spi-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: img-spfi: Increase DMA burst size
  spi: img-spfi: Enable controller before starting TX DMA
  spi: sh-msiof: Add runtime PM lock in initializing

9 years agoMerge tag 'regulator-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 29 Dec 2014 21:24:38 +0000 (13:24 -0800)]
Merge tag 'regulator-v3.19-rc2' of git://git./linux/kernel/git/broonie/regulator

Pull one regulator fix from Mark Brown:
 "One fix here, a fix for the voltage mapping on one of the s2mps11
  regulators which broke systems using it including apparently the
  Gear 2 smartwatches"

* tag 'regulator-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: s2mps11: Fix dw_mmc failure on Gear 2

9 years agoMerge tag 'mmc-v3.19-2' of git://git.linaro.org/people/ulf.hansson/mmc
Linus Torvalds [Mon, 29 Dec 2014 21:19:56 +0000 (13:19 -0800)]
Merge tag 'mmc-v3.19-2' of git://git.linaro.org/people/ulf.hansson/mmc

Pull one MMC fix from Ulf Hansson:
 "MMC core:

   - Fix selection of buswidth for mmc hosts supporting 1-bit only"

* tag 'mmc-v3.19-2' of git://git.linaro.org/people/ulf.hansson/mmc:
  mmc: core: stop trying to switch width when only one bit is supported

9 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Linus Torvalds [Mon, 29 Dec 2014 21:13:41 +0000 (13:13 -0800)]
Merge branch 'next' of git://git./linux/kernel/git/rzhang/linux

Pull thermal management updates from Zhang Rui:
 "First of all, the most important change is the thermal cpu cooling
  fixes.  The major fix here is to have proper sequencing between
  cpufreq layer and thermal cpu cooling registration.  A take away of
  this fix is an improvement in the thermal drivers code.  Thermal
  drivers that require cpu cooling do not need to check for cpufreq
  layer.  The requirement now is to propagate the error code, if any,
  while registering cpu cooling device.  Thanks to Viresh for
  implementing the required CPUfreq changes.

  Second, a new driver is introduced for int340x processor thermal
  device.  Given that int340x thermal is disabled by default, and this
  processor thermal device is only available on limited platforms, plus
  the driver does nothing but exposes some thermal limitation
  information for user space to use, thus I think it is safe to include
  it in this pull request after missing 3.19-rc2.

  Specifics:

   - Thermal cpu cooling fixes and cleanups.

   - introduce INT340X processor thermal reporting device driver.

   - several small fixes and cleanups for int340x thermal drivers"

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (43 commits)
  Thermal/int340x/int3403: Free acpi notification handler
  Thermal/int340x/processor_thermal: Fix memory leak
  Thermal/int340x/int3403: Fix memory leak
  thermal: int340x: Introduce processor reporting device
  thermal: int340x_thermal: drop owner assignment from platform_drivers
  thermal: drop owner assignment from platform_drivers
  thermal: cpu_cooling: document node in struct cpufreq_cooling_device
  thermal/powerclamp: add ids for future xeon cpus
  Thermal/int340x: Handle properly the case when _trt or _art acpi entry is missing
  thermal: cpu_cooling: return ERR_PTR() for !CPU_THERMAL or !THERMAL_OF
  thermal: cpu_cooling: small memory leak on error
  thermal: ti-soc-thermal: Do not print error message in the EPROBE_DEFER case
  thermal: db8500: Do not print error message in the EPROBE_DEFER case
  thermal: imx: Do not print error message in the EPROBE_DEFER case
  thermal: Fix cdev registration with THERMAL_NO_LIMIT on 64bit
  drivers: thermal: Remove ARCH_HAS_BANDGAP dependency for samsung
  thermal:core:fix: Check return code of the ->get_max_state() callback
  thermal: cpu_cooling: update copyright tags
  thermal: cpu_cooling: Use cpufreq_dev->freq_table for finding level/freq
  thermal: cpu_cooling: Store frequencies in descending order
  ...

9 years agomm: get rid of radix tree gfp mask for pagecache_get_page
Michal Hocko [Mon, 29 Dec 2014 19:30:35 +0000 (20:30 +0100)]
mm: get rid of radix tree gfp mask for pagecache_get_page

Commit 2457aec63745 ("mm: non-atomically mark page accessed during page
cache allocation where possible") has added a separate parameter for
specifying gfp mask for radix tree allocations.

Not only this is less than optimal from the API point of view because it
is error prone, it is also buggy currently because
grab_cache_page_write_begin is using GFP_KERNEL for radix tree and if
fgp_flags doesn't contain FGP_NOFS (mostly controlled by fs by
AOP_FLAG_NOFS flag) but the mapping_gfp_mask has __GFP_FS cleared then
the radix tree allocation wouldn't obey the restriction and might
recurse into filesystem and cause deadlocks.  This is the case for most
filesystems unfortunately because only ext4 and gfs2 are using
AOP_FLAG_NOFS.

Let's simply remove radix_gfp_mask parameter because the allocation
context is same for both page cache and for the radix tree.  Just make
sure that the radix tree gets only the sane subset of the mask (e.g.  do
not pass __GFP_WRITE).

Long term it is more preferable to convert remaining users of
AOP_FLAG_NOFS to use mapping_gfp_mask instead and simplify this
interface even further.

Reported-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge branch 'acpi-video'
Rafael J. Wysocki [Mon, 29 Dec 2014 20:24:13 +0000 (21:24 +0100)]
Merge branch 'acpi-video'

* acpi-video:
  ACPI / video: Add some Samsung models to disable_native_backlight list

9 years agoMerge branches 'pm-domains', 'powercap' and 'pm-tools'
Rafael J. Wysocki [Mon, 29 Dec 2014 20:24:00 +0000 (21:24 +0100)]
Merge branches 'pm-domains', 'powercap' and 'pm-tools'

* pm-domains:
  PM / Domains: Export of_genpd_get_from_provider function

* powercap:
  powercap / RAPL: add IDs for future Xeon CPUs

* pm-tools:
  tools / cpupower: Fix no idle state information return value
  tools / cpupower: Correctly detect if running as root

9 years agoMerge branches 'pm-cpufreq' and 'pm-cpuidle'
Rafael J. Wysocki [Mon, 29 Dec 2014 20:23:41 +0000 (21:23 +0100)]
Merge branches 'pm-cpufreq' and 'pm-cpuidle'

* pm-cpufreq:
  cpufreq: fix a NULL pointer dereference in __cpufreq_governor()
  cpufreq-dt: defer probing if OPP table is not ready

* pm-cpuidle:
  cpuidle / ACPI: remove unused CPUIDLE_FLAG_TIME_INVALID
  cpuidle: ladder: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID
  cpuidle: menu: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID