GitHub/LineageOS/android_kernel_motorola_exynos9610.git
7 years agoALSA: atmel: make snd_pcm_hardware const
Bhumika Goyal [Thu, 17 Aug 2017 09:15:50 +0000 (14:45 +0530)]
ALSA: atmel: make snd_pcm_hardware const

Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: arm: make snd_pcm_hardware const
Bhumika Goyal [Thu, 17 Aug 2017 09:15:49 +0000 (14:45 +0530)]
ALSA: arm: make snd_pcm_hardware const

Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: wavefront: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:30 +0000 (15:36 +0530)]
ALSA: wavefront: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: sscape: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:29 +0000 (15:36 +0530)]
ALSA: sscape: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: sb16: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:28 +0000 (15:36 +0530)]
ALSA: sb16: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: opti9xx: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:27 +0000 (15:36 +0530)]
ALSA: opti9xx: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: msnd: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:26 +0000 (15:36 +0530)]
ALSA: msnd: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: gus: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:25 +0000 (15:36 +0530)]
ALSA: gus: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: es1688: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:24 +0000 (15:36 +0530)]
ALSA: es1688: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: cs4236: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:23 +0000 (15:36 +0530)]
ALSA: cs4236: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: cmi8330: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:22 +0000 (15:36 +0530)]
ALSA: cmi8330: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: azt2320: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:21 +0000 (15:36 +0530)]
ALSA: azt2320: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: als100: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:20 +0000 (15:36 +0530)]
ALSA: als100: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ad1816a: constify pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:19 +0000 (15:36 +0530)]
ALSA: ad1816a: constify pnp_card_device_id

pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:18 +0000 (15:36 +0530)]
ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id

*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: es18xx: constify pnp_device_id and pnp_card_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:17 +0000 (15:36 +0530)]
ALSA: es18xx: constify pnp_device_id and pnp_card_device_id

*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: drivers: mpu401: constify pnp_device_id
Arvind Yadav [Thu, 17 Aug 2017 10:06:16 +0000 (15:36 +0530)]
ALSA: drivers: mpu401: constify pnp_device_id

pnp_device_id are not supposed to change at runtime. All functions
working with pnp_device_id provided by <linux/pnp.h> work with
const pnp_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: hda: make snd_kcontrol_new const
Bhumika Goyal [Wed, 16 Aug 2017 08:44:11 +0000 (14:14 +0530)]
ALSA: hda: make snd_kcontrol_new const

Make these const as they are only passed as the 3rd argument to the
function snd_hda_gen_add_kctl, which is of type const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: pcxhr: make snd_kcontrol_new const
Bhumika Goyal [Wed, 16 Aug 2017 08:44:10 +0000 (14:14 +0530)]
ALSA: pcxhr: make snd_kcontrol_new const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: aoa: make snd_kcontrol_new const
Bhumika Goyal [Wed, 16 Aug 2017 08:44:09 +0000 (14:14 +0530)]
ALSA: aoa: make snd_kcontrol_new const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: firewire-motu: constify snd_rawmidi_ops structures
Julia Lawall [Tue, 15 Aug 2017 08:09:54 +0000 (10:09 +0200)]
ALSA: firewire-motu: constify snd_rawmidi_ops structures

These snd_rawmidi_ops structures are only passed as the third
argument of snd_rawmidi_set_ops.  This argument is const, so the
snd_rawmidi_ops structures can be const too.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agosound: emu8000: constify emu8000_ops
Julia Lawall [Mon, 14 Aug 2017 17:13:26 +0000 (19:13 +0200)]
sound: emu8000: constify emu8000_ops

The structure emu8000_ops is only copied into another structure, so
it can be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: rme9652: Use common error handling code in two functions
Markus Elfring [Mon, 14 Aug 2017 20:00:40 +0000 (22:00 +0200)]
ALSA: rme9652: Use common error handling code in two functions

Add a jump target so that a bit of exception handling can be better reused
in these functions.

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>
7 years agoALSA: wss: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:07 +0000 (17:28 +0530)]
ALSA: wss: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: sb8: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:06 +0000 (17:28 +0530)]
ALSA: sb8: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: sb16: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:05 +0000 (17:28 +0530)]
ALSA: sb16: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: emu8000: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:04 +0000 (17:28 +0530)]
ALSA: emu8000: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: msnd: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:03 +0000 (17:28 +0530)]
ALSA: msnd: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: gus: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:02 +0000 (17:28 +0530)]
ALSA: gus: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: es18xx: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:01 +0000 (17:28 +0530)]
ALSA: es18xx: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: es1688: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:58:00 +0000 (17:28 +0530)]
ALSA: es1688: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ad1816a: constify snd_pcm_ops structures
Arvind Yadav [Fri, 11 Aug 2017 11:57:59 +0000 (17:27 +0530)]
ALSA: ad1816a: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: mpu401: Adjust four checks for null pointers
Markus Elfring [Sat, 12 Aug 2017 18:50:16 +0000 (20:50 +0200)]
ALSA: mpu401: Adjust four checks for null pointers

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written !…

Thus fix the affected source code places.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: mpu401: Use common error handling code in snd_mpu401_uart_new()
Markus Elfring [Sat, 12 Aug 2017 18:40:17 +0000 (20:40 +0200)]
ALSA: mpu401: Use common error handling code in snd_mpu401_uart_new()

Add a jump target so that a bit of exception handling can be better reused
at the end of this function.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: mpu401: Delete an error message for a failed memory allocation in snd_mpu401_ua...
Markus Elfring [Sat, 12 Aug 2017 18:20:11 +0000 (20:20 +0200)]
ALSA: mpu401: Delete an error message for a failed memory allocation in snd_mpu401_uart_new()

Omit an extra message for a memory allocation failure in this function.

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>
7 years agoALSA: opl3: Delete an error message for a failed memory allocation in snd_opl3_new()
Markus Elfring [Sat, 12 Aug 2017 17:54:20 +0000 (19:54 +0200)]
ALSA: opl3: Delete an error message for a failed memory allocation in snd_opl3_new()

Omit an extra message for a memory allocation failure in this function.

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>
7 years agoALSA: ca0106: Delete an error message for a failed memory allocation in snd_ca0106_pc...
Markus Elfring [Sat, 12 Aug 2017 17:09:23 +0000 (19:09 +0200)]
ALSA: ca0106: Delete an error message for a failed memory allocation in snd_ca0106_pcm_open_capture_channel()

Omit an extra message for a memory allocation failure in this function.

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>
7 years agoALSA: mixart: Delete an error message for a failed memory allocation in snd_mixart_cr...
Markus Elfring [Sat, 12 Aug 2017 16:45:42 +0000 (18:45 +0200)]
ALSA: mixart: Delete an error message for a failed memory allocation in snd_mixart_create()

Omit an extra message for a memory allocation failure in this function.

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>
7 years agoALSA: pcxhr: Delete an error message for a failed memory allocation in pcxhr_create()
Markus Elfring [Sat, 12 Aug 2017 16:14:54 +0000 (18:14 +0200)]
ALSA: pcxhr: Delete an error message for a failed memory allocation in pcxhr_create()

Omit an extra message for a memory allocation failure in this function.

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>
7 years agoALSA: pci: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:28 +0000 (21:01 +0530)]
ALSA: pci: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ymfpci: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:27 +0000 (21:01 +0530)]
ALSA: ymfpci: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: trident: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:26 +0000 (21:01 +0530)]
ALSA: trident: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: rme9652: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:25 +0000 (21:01 +0530)]
ALSA: rme9652: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: riptide: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:24 +0000 (21:01 +0530)]
ALSA: riptide: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: pcxhr: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:23 +0000 (21:01 +0530)]
ALSA: pcxhr: make snd_pcm_hardware const

Make this const as it is only used during a copy operation.
Done using Coccinelle

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ctxfi: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:22 +0000 (21:01 +0530)]
ALSA: ctxfi: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: mixart: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:21 +0000 (21:01 +0530)]
ALSA: mixart: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: lx6464es: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:20 +0000 (21:01 +0530)]
ALSA: lx6464es: make snd_pcm_hardware const

Make this const as it is only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: lola: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:19 +0000 (21:01 +0530)]
ALSA: lola: make snd_pcm_hardware const

Make this const as it is only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: emu10k1: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:18 +0000 (21:01 +0530)]
ALSA: emu10k1: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: cs5535audio: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:17 +0000 (21:01 +0530)]
ALSA: cs5535audio: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: korg1212: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:16 +0000 (21:01 +0530)]
ALSA: korg1212: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: cs46xx: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:15 +0000 (21:01 +0530)]
ALSA: cs46xx: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ca0106: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:14 +0000 (21:01 +0530)]
ALSA: ca0106: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: aw2: make snd_pcm_hardware const
Bhumika Goyal [Sat, 12 Aug 2017 15:31:13 +0000 (21:01 +0530)]
ALSA: aw2: make snd_pcm_hardware const

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: rme9652: Adjust seven checks for null pointers
Markus Elfring [Sat, 12 Aug 2017 15:07:09 +0000 (17:07 +0200)]
ALSA: rme9652: Adjust seven checks for null pointers

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written …

Thus fix the affected source code places.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: rme9652: Improve eight size determinations
Markus Elfring [Sat, 12 Aug 2017 14:50:06 +0000 (16:50 +0200)]
ALSA: rme9652: Improve eight size determinations

Replace the specification of data structures by variable references
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: rme9652: Delete an error message for a failed memory allocation in snd_hdspm_cr...
Markus Elfring [Sat, 12 Aug 2017 14:10:32 +0000 (16:10 +0200)]
ALSA: rme9652: Delete an error message for a failed memory allocation in snd_hdspm_create()

Omit an extra message for a memory allocation failure in this function.

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>
7 years agoALSA: rme96: Adjust five checks for null pointers
Markus Elfring [Sat, 12 Aug 2017 13:18:56 +0000 (15:18 +0200)]
ALSA: rme96: Adjust five checks for null pointers

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written …

Thus fix the affected source code places.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: rme96: Use common error handling code in snd_rme96_probe()
Markus Elfring [Sat, 12 Aug 2017 12:50:33 +0000 (14:50 +0200)]
ALSA: rme96: Use common error handling code in snd_rme96_probe()

Add a jump target so that a bit of exception handling can be better reused
at the end of this function.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: rme96: Delete two error messages for a failed memory allocation in snd_rme96_pr...
Markus Elfring [Sat, 12 Aug 2017 12:24:41 +0000 (14:24 +0200)]
ALSA: rme96: Delete two error messages for a failed memory allocation in snd_rme96_probe()

Omit extra messages for a memory allocation failure in this function.

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>
7 years agoALSA: trident: Delete an error message for a failed memory allocation in snd_trident_...
Markus Elfring [Sat, 12 Aug 2017 11:20:16 +0000 (13:20 +0200)]
ALSA: trident: Delete an error message for a failed memory allocation in snd_trident_tlb_alloc()

Omit an extra message for a memory allocation failure in this function.

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>
7 years agoALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation...
Markus Elfring [Fri, 11 Aug 2017 17:39:06 +0000 (19:39 +0200)]
ALSA: usb: caiaq: audio: Delete two error messages for a failed memory allocation in alloc_urbs()

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

[Fixed the unused variable warning by this change as well -- tiwai]

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: usb: Delete an error message for a failed memory allocation in two functions
Markus Elfring [Fri, 11 Aug 2017 16:38:25 +0000 (18:38 +0200)]
ALSA: usb: Delete an error message for a failed memory allocation in two functions

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: usx2y: Delete an error message for a failed memory allocation in two functions
Markus Elfring [Fri, 11 Aug 2017 15:40:57 +0000 (17:40 +0200)]
ALSA: usx2y: Delete an error message for a failed memory allocation in two functions

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: trident: constify snd_pcm_ops structures
Arvind Yadav [Thu, 10 Aug 2017 11:47:38 +0000 (17:17 +0530)]
ALSA: trident: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: sis7019: constify snd_pcm_ops structures
Arvind Yadav [Thu, 10 Aug 2017 11:47:37 +0000 (17:17 +0530)]
ALSA: sis7019: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: intel8x0m: constify snd_pcm_ops structures
Arvind Yadav [Thu, 10 Aug 2017 11:47:36 +0000 (17:17 +0530)]
ALSA: intel8x0m: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: intel8x0: constify snd_pcm_ops structures
Arvind Yadav [Thu, 10 Aug 2017 11:47:35 +0000 (17:17 +0530)]
ALSA: intel8x0: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: echoaudio: constify snd_pcm_ops structures
Arvind Yadav [Thu, 10 Aug 2017 11:47:34 +0000 (17:17 +0530)]
ALSA: echoaudio: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: au88x0: constify snd_pcm_ops structures
Arvind Yadav [Thu, 10 Aug 2017 11:47:33 +0000 (17:17 +0530)]
ALSA: au88x0: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ali5451: constify snd_pcm_ops structures
Arvind Yadav [Thu, 10 Aug 2017 11:47:32 +0000 (17:17 +0530)]
ALSA: ali5451: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: emux: Delete two error messages for a failed memory allocation in snd_emux_crea...
Markus Elfring [Wed, 9 Aug 2017 07:30:34 +0000 (09:30 +0200)]
ALSA: emux: Delete two error messages for a failed memory allocation in snd_emux_create_port()

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: emux: Adjust four checks for null pointers
Markus Elfring [Wed, 9 Aug 2017 07:22:42 +0000 (09:22 +0200)]
ALSA: emux: Adjust four checks for null pointers

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written !…

Thus fix affected source code places.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: emux: Improve a size determination in two functions
Markus Elfring [Wed, 9 Aug 2017 07:11:26 +0000 (09:11 +0200)]
ALSA: emux: Improve a size determination in two functions

Replace the specification of data types by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: emux: Adjust one function call together with a variable assignment
Markus Elfring [Wed, 9 Aug 2017 06:40:14 +0000 (08:40 +0200)]
ALSA: emux: Adjust one function call together with a variable assignment

The script "checkpatch.pl" pointed information out like the following.

ERROR: do not use assignment in if condition

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: usbusx2y: constify usb_device_id.
Arvind Yadav [Sun, 6 Aug 2017 06:48:59 +0000 (12:18 +0530)]
ALSA: usbusx2y: constify usb_device_id.

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: us122l: constify usb_device_id.
Arvind Yadav [Sun, 6 Aug 2017 06:48:58 +0000 (12:18 +0530)]
ALSA: us122l: constify usb_device_id.

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ua101: constify usb_device_id.
Arvind Yadav [Sun, 6 Aug 2017 06:48:57 +0000 (12:18 +0530)]
ALSA: ua101: constify usb_device_id.

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: usb-audio: constify usb_device_id.
Arvind Yadav [Sun, 6 Aug 2017 06:48:56 +0000 (12:18 +0530)]
ALSA: usb-audio: constify usb_device_id.

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: snd-usb-caiaq: constify usb_device_id.
Arvind Yadav [Sun, 6 Aug 2017 06:48:55 +0000 (12:18 +0530)]
ALSA: snd-usb-caiaq: constify usb_device_id.

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: bcd2000: constify usb_device_id.
Arvind Yadav [Sun, 6 Aug 2017 06:48:54 +0000 (12:18 +0530)]
ALSA: bcd2000: constify usb_device_id.

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: 6fire: constify usb_device_id.
Arvind Yadav [Sun, 6 Aug 2017 06:48:53 +0000 (12:18 +0530)]
ALSA: 6fire: constify usb_device_id.

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: hda: Add Cannonlake PCI ID
Guneshwor Singh [Sat, 5 Aug 2017 08:35:46 +0000 (14:05 +0530)]
ALSA: hda: Add Cannonlake PCI ID

Cannonlake is next generation Intel platform. This commit adds PCI ID for
it.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ice1712: add const to snd_akm4xxx structures
Bhumika Goyal [Fri, 4 Aug 2017 17:49:30 +0000 (23:19 +0530)]
ALSA: ice1712: add const to snd_akm4xxx structures

Declare snd_akm4xxx structures  as const as they are only passed
to the function snd_ice1712_akm4xxx_init. This argument is of type
const, so make the structures const.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_akm4xxx s@p={...};

@good1@
identifier match.s;
position p;
@@
snd_ice1712_akm4xxx_init(...,&s@p,...)

@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p

@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_akm4xxx s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: ice1712: add const to snd_ak4xxx_private structures
Bhumika Goyal [Fri, 4 Aug 2017 15:34:41 +0000 (21:04 +0530)]
ALSA: ice1712: add const to snd_ak4xxx_private structures

Declare snd_ak4xxx_private structures  as const as they are only passed
to the function snd_ice1712_akm4xxx_init. This argument is of type const,
so make the structures const.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_ak4xxx_private s@p={...};

@good1@
identifier match.s;
position p;
@@
snd_ice1712_akm4xxx_init(...,&s@p,...)

@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p

@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_ak4xxx_private s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: control: code refactoring for TLV request handler to user element set
Takashi Sakamoto [Thu, 3 Aug 2017 11:20:44 +0000 (20:20 +0900)]
ALSA: control: code refactoring for TLV request handler to user element set

User-defined element set registers own handler to get callbacks from TLV
ioctl handler. In the handler, execution path bifurcates depending on
requests from user space. At write request, container in given buffer is
registered to the element set, or replaced old TLV data. At the read
request, the registered data is copied to user space. The command request
is not allowed.  In current implementation, function of the handler
includes codes for the two cases.

This commit adds two helper functions for these cases so that readers can
easily get the above design.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: control: code refactoring TLV ioctl handler
Takashi Sakamoto [Thu, 3 Aug 2017 11:20:43 +0000 (20:20 +0900)]
ALSA: control: code refactoring TLV ioctl handler

In a design of ALSA control core, execution path bifurcates depending on
target element. When a set with the target element has a handler, it's
called. Else, registered buffer is copied to user space. These two
operations are apparently different.  In current implementation, they're
on the same function with a condition statement. This makes it a bit hard
to understand conditions of each case.

This commit splits codes for these two cases.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: control: obsolete user_ctl_lock
Takashi Sakamoto [Thu, 3 Aug 2017 11:20:42 +0000 (20:20 +0900)]
ALSA: control: obsolete user_ctl_lock

At a previous commit, concurrent requests for TLV data are maintained
exclusively between read requests and write/command requests. TLV
callback handlers in each driver has no risk from concurrent access for
reference/change.

In current implementation, 'struct snd_card' has a mutex to control
concurrent accesses to user-defined element sets. This commit obsoletes it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: control: use counting semaphore as write lock for TLV write/command operations
Takashi Sakamoto [Thu, 3 Aug 2017 11:20:41 +0000 (20:20 +0900)]
ALSA: control: use counting semaphore as write lock for TLV write/command operations

In ALSA control interface, applications can execute three types of request
for Type-Length-Value (TLV) data to a set of elements; read, write and
command. In ALSA control core, all of the requests are handled within read
lock to a counting semaphore, therefore several processes can run to access
to the data at the same time for any purposes. This has an issue because
write and command requests have side effect to change state of a set of
elements for the TLV data. Concurrent access should be controlled for each
of reference/change case.

This commit uses the counting semaphore as read lock for TLV read requests,
while use it as write lock for TLV write/command requests. The state of a
set of elements for the TLV data is maintained exclusively between read
requests and write/command requests, or between write and command requests.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoALSA: control: queue events within locking of controls_rwsem for TLV operation
Takashi Sakamoto [Thu, 3 Aug 2017 11:20:40 +0000 (20:20 +0900)]
ALSA: control: queue events within locking of controls_rwsem for TLV operation

Any control event is queued by a call of snd_ctl_notify(). This function
adds the event to each queue of opened file data corresponding to ALSA
control character devices. This function acquired two types of lock; a
counting semaphore for a list of the opened file data and a spinlock for
card data opened by the file. Typically, this function is called after
acquiring a counting semaphore for a list of elements in the card data.

In current implementation of TLV request handler, the function is called
after releasing the semaphore for a list of elements in the card data.
This release is not necessarily needed.

This commit removes the release to call the function within the critical
section so that later commits are simple.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Fri, 4 Aug 2017 14:49:38 +0000 (16:49 +0200)]
Merge branch 'for-linus' into for-next

Back-merge 4.13-rc devel branch for later development.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoMerge tag 'asoc-fix-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broon...
Takashi Iwai [Wed, 2 Aug 2017 15:11:45 +0000 (17:11 +0200)]
Merge tag 'asoc-fix-v4.13-rc3' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.13

Quite a few fixes here that have been sent since the merge window, the
biggest one is the fix from Tony for some confusion with the device
property API which was causing issues with the of-graph card.  This is
fixed with some changes in the graph API itself as it seemed very likely
to be error prone.

7 years agoALSA: hda - Fix speaker output from VAIO VPCL14M1R
Sergei A. Trusov [Wed, 2 Aug 2017 10:23:48 +0000 (20:23 +1000)]
ALSA: hda - Fix speaker output from VAIO VPCL14M1R

Sony VAIO VPCL14M1R needs the quirk to make the speaker working properly.

Tested-by: Dmitriy <mexx400@yandex.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agoMerge remote-tracking branches 'asoc/fix/rt5663', 'asoc/fix/rt5665', 'asoc/fix/samsun...
Mark Brown [Tue, 1 Aug 2017 14:17:11 +0000 (15:17 +0100)]
Merge remote-tracking branches 'asoc/fix/rt5663', 'asoc/fix/rt5665', 'asoc/fix/samsung', 'asoc/fix/sgtl5000' and 'asoc/fix/sh' into asoc-linus

7 years agoMerge remote-tracking branches 'asoc/fix/dpcm', 'asoc/fix/imx', 'asoc/fix/msm8916...
Mark Brown [Tue, 1 Aug 2017 14:17:06 +0000 (15:17 +0100)]
Merge remote-tracking branches 'asoc/fix/dpcm', 'asoc/fix/imx', 'asoc/fix/msm8916', 'asoc/fix/multi-pcm', 'asoc/fix/of-graph' and 'asoc/fix/pxa' into asoc-linus

7 years agoMerge remote-tracking branch 'asoc/fix/intel' into asoc-linus
Mark Brown [Tue, 1 Aug 2017 14:17:04 +0000 (15:17 +0100)]
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

7 years agodevice property: Fix usecount for of_graph_get_port_parent()
Tony Lindgren [Fri, 28 Jul 2017 08:23:15 +0000 (01:23 -0700)]
device property: Fix usecount for of_graph_get_port_parent()

Fix inconsistent use of of_graph_get_port_parent() where
asoc_simple_card_parse_graph_dai() does of_node_get() before
calling it while other callers do not. We can fix this by
not trashing the node passed to of_graph_get_port_parent().

Let's also make sure the callers have correct refcounts and remove
related incorrect of_node_put() calls for of_for_each_phandle
as that's done by of_phandle_iterator_next() except when
we break out of the loop early.

Let's fix both issues with a single patch to avoid kobject
refcounts getting messed up more if two patches are merged
separately.

Otherwise strange issues can happen caused by memory corruption
caused by too many kobject_del() calls such as:

BUG: sleeping function called from invalid context at
kernel/locking/mutex.c:747
...
(___might_sleep)
(__mutex_lock)
(mutex_lock_nested)
(kernfs_remove)
(kobject_del)
(kobject_put)
(of_get_next_parent)
(of_graph_get_port_parent)
(asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils])
(asoc_graph_card_probe [snd_soc_audio_graph_card])

Fixes: 0ef472a973eb ("of_graph: add of_graph_get_port_parent()")
Fixes: 2692c1c63c29 ("ASoC: add audio-graph-card support")
Fixes: 1689333f8311 ("ASoC: simple-card-utils: add asoc_simple_card_parse_graph_dai()")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Tested-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rt5665: fix wrong register for bclk ratio control
Bard Liao [Tue, 1 Aug 2017 02:30:53 +0000 (10:30 +0800)]
ASoC: rt5665: fix wrong register for bclk ratio control

The register of setting back ratio should be RT5665_ADDA_CLK_2
instead of RT5665_ADDA_CLK_1.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoLinux 4.13-rc3
Linus Torvalds [Sun, 30 Jul 2017 19:40:36 +0000 (12:40 -0700)]
Linux 4.13-rc3