Commit graph

17 commits

Author SHA1 Message Date
Felipe Pena 1b3ed70a1b ASoC: fsl: Fix memory leak in imx-audmux.c
When audmux_clk is used and clk_prepare_enable function succeed,
the memory alloc'd to buf variable is leaked

Signed-off-by: Felipe Pena <felipensp@gmail.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 12:52:59 +01:00
Fabio Estevam bae35992af ASoC: fsl: imx-audmux: Do not call imx_audmux_parse_dt_defaults() on non-dt kernel
Booting a mx51babbage board with a non-dt kernel leads to the following crash:

Unable to handle kernel NULL pointer dereference at virtual address 0000001c
pgd = 80004000
[0000001c] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.11.0-next-20130903 #287
task: 9f860000 ti: 9f862000 task.ti: 9f862000
PC is at of_get_next_available_child+0x5c/0x68
LR is at of_get_next_available_child+0x1c/0x68
pc : [<8043ea58>]    lr : [<8043ea18>]    psr: 60000193
sp : 9f863d58  ip : 00000000  fp : 9f863d74
r10: 9f89a010  r9 : 9f862000  r8 : 807bb26c
r7 : 80615d5c  r6 : 00000000  r5 : 60000113  r4 : 00000000
r3 : 00000000  r2 : 808770a4  r1 : 00000011  r0 : 60000113
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 90004019  DAC: 00000017
Process swapper/0 (pid: 1, stack limit = 0x9f862240)
Stack: (0x9f863d58 to 0x9f864000)

This is caused by commit 8548a464b9 (ASoC: imx-audmux: Read default
configuration from devicetree).

In order to fix this, add a check for 'of_id' so that
imx_audmux_parse_dt_defaults() only gets called when a dt kernel is running.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-04 00:20:00 +01:00
Markus Pargmann 9c0aeaa384 ASoC: imx-audmux: default configuration parser fixups
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-11 11:59:27 +01:00
Markus Pargmann 8548a464b9 ASoC: imx-audmux: Read default configuration from devicetree
Adds a function to parse a default port configuration from devicetree.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 17:57:24 +01:00
Fabio Estevam 72192366f4 ASoC: fsl: imx-audmux: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22 00:58:36 +01:00
Fabio Estevam 436947fc82 ASoC: fsl: imx-audmux: Let device core handle pinctrl
Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for handling pinctrl.

So remove devm_pinctrl_get_select_default() from the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-12 20:45:34 +04:00
Fabio Estevam 127c5cad87 ASoC: fsl: imx-audmux: Use devm_clk_get()
By using devm_clk_get() we can save a call to clk_put().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-13 10:39:31 +00:00
Linus Torvalds 06991c28f3 Driver core patches for 3.9-rc1
Here is the big driver core merge for 3.9-rc1
 
 There are two major series here, both of which touch lots of drivers all
 over the kernel, and will cause you some merge conflicts:
   - add a new function called devm_ioremap_resource() to properly be
     able to check return values.
   - remove CONFIG_EXPERIMENTAL
 
 If you need me to provide a merged tree to handle these resolutions,
 please let me know.
 
 Other than those patches, there's not much here, some minor fixes and
 updates.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlEmV0cACgkQMUfUDdst+yncCQCfbmnQZju7kzWXk6PjdFuKspT9
 weAAoMCzcAtEzzc4LXuUxxG/sXBVBCjW
 =yWAQ
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core patches from Greg Kroah-Hartman:
 "Here is the big driver core merge for 3.9-rc1

  There are two major series here, both of which touch lots of drivers
  all over the kernel, and will cause you some merge conflicts:

   - add a new function called devm_ioremap_resource() to properly be
     able to check return values.

   - remove CONFIG_EXPERIMENTAL

  Other than those patches, there's not much here, some minor fixes and
  updates"

Fix up trivial conflicts

* tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
  base: memory: fix soft/hard_offline_page permissions
  drivercore: Fix ordering between deferred_probe and exiting initcalls
  backlight: fix class_find_device() arguments
  TTY: mark tty_get_device call with the proper const values
  driver-core: constify data for class_find_device()
  firmware: Ignore abort check when no user-helper is used
  firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
  firmware: Make user-mode helper optional
  firmware: Refactoring for splitting user-mode helper code
  Driver core: treat unregistered bus_types as having no devices
  watchdog: Convert to devm_ioremap_resource()
  thermal: Convert to devm_ioremap_resource()
  spi: Convert to devm_ioremap_resource()
  power: Convert to devm_ioremap_resource()
  mtd: Convert to devm_ioremap_resource()
  mmc: Convert to devm_ioremap_resource()
  mfd: Convert to devm_ioremap_resource()
  media: Convert to devm_ioremap_resource()
  iommu: Convert to devm_ioremap_resource()
  drm: Convert to devm_ioremap_resource()
  ...
2013-02-21 12:05:51 -08:00
Fabio Estevam a10807aef5 ASoC: fsl: imx-audmux: Fix sparse warning
Fix the following sparse warning:

sound/soc/fsl/imx-audmux.c:182:3: warning: symbol 'audmux_type' was not declared. Should it be static?

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11 16:54:30 +00:00
Thierry Reding b25b5aa066 ASoC: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 11:41:58 -08:00
Bill Pemberton a0a3d518c3 ASoC: fsl: remove __dev* attributes
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10 00:30:25 +09:00
Richard Zhao f3a50c95e2 ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file
When audmux_read_file is called, it means the driver is already
initialised successfully, so we don't need to check audmux_base.

It also fix smatch warning:
sound/soc/fsl/imx-audmux.c:78 audmux_read_file() warn: possible memory leak of 'buf'

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-18 22:53:15 -04:00
Torben Hohn 409b78cc17 ASoC imx-audmux: add MX31_AUDMUX_PORT7_SSI_PINS_7 define
The MX31 Audmux also has 7 Ports.
This patch adds the missing define, and makes the debugfs code iterate
over that port too.

Signed-off-by: Torben Hohn <torbenh@linutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-18 22:09:40 +01:00
Richard Zhao a1c85ec037 ASoC: imx-audmux: add pinctrl support
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-04 10:53:59 +01:00
Mark Brown d5efccd5b6 Linux 3.4-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEbBAABAgAGBQJPi3XOAAoJEHm+PkMAQRiGnsUH9RjHwH4YFVyuP/DKtKa6zs74
 wqkpT15yITQ5WWMog4JaJFFg5rJCUd8QZr7AS/HSn0ijDyZX5VU7Rcs9cMudDzNR
 H/5K/AscS4fjb0HwWVqoltTWHRb9QGSwVN3+E3VCDLt9P89YJ0o3QztkkuEX5dkZ
 jc7reVXTfRnCcILEa9jleOzrn+OLM3j/jAjQ2hGunl8EDLzD4b17HHPoli4jEZ/5
 5ibpSVsPD+AqzN+glbXvYjVItl12D0IQos/JdOwfuZriCVWLxysSSwHZTbPCyvBZ
 LHH4HR5T+XLSXbjJeNkUFHLzqU+d5gVRadIoWtJCxqxFjKbOs2YtzJ5Ai0nDiw==
 =kTkC
 -----END PGP SIGNATURE-----

ASoC: Merge tag 'v3.4-rc3' into for-3.5

Linux 3.4-rc3 contains a bunch of Tegra changes which are conflicting
annoyingly with the new development that's going on for Tegra so merge
it up to resolve those conflicts.

Conflicts:
	sound/soc/soc-core.c
	sound/soc/tegra/tegra_i2s.c
	sound/soc/tegra/tegra_spdif.c
2012-04-16 19:40:27 +01:00
Mark Brown 1eecb8280b Linux 3.4-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPgOpXAAoJEHm+PkMAQRiG8eUIAJ3Hjo0o5hqzxol8LWHDGF8s
 3h59qwRtts82u2psStZULPLbBzw6yjn8U5Mcrh7pffwCG2BzBL5rXcmXfvoPaET3
 TjylIj986Jv+jwZyuyZcLzYyoUtgjtq7hnt4tgVVEPlexYs7LxUl8vO8QjxT+bVO
 7eKgzLsXlBC9kw4P5M7kOBQ9NE5vmEcKf+fB3Hu3DqfVJtw9Lb7EeDQj/cbQsGqI
 vavSxe7lMTPsgMP2+hRz4txGTDJNRazkO2BdwfYrcNwTSa8tfBFlamww3y4+eJtq
 MFQfdNxQpumh2++T4IC2i/nLaawH7kWj2EdaRCRLMy9hVlb/v8/wcgd+1nfLkU8=
 =0on9
 -----END PGP SIGNATURE-----

Merge tag 'v3.4-rc2' into for-3.5

Linux 3.4-rc2 contains some bug fixes we need, including the addition of
an export for regcache_sync_region().
2012-04-09 11:53:45 +01:00
Shawn Guo a23dc69482 ASoC: imx: merge sound/soc/imx into sound/soc/fsl
Freescale PowerPC and ARM/IMX families share the same SSI IP block.
The patch merges sound/soc/imx into sound/soc/fsl, so that the possible
code sharing and consolidation can happen.

This is a plain merge, except that menuconfig SND_POWERPC_SOC is added
in Kconfig for PowerPC platform as a correspondence to SND_IMX_SOC for
IMX platform.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:26 +01:00
Renamed from sound/soc/imx/imx-audmux.c (Browse further)