aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-09-01Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds2-2/+2
Pull trivial tree updates from Jiri Kosina: "The usual stuff from trivial tree for 4.3 (kerneldoc updates, printk() fixes, Documentation and MAINTAINERS updates)" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits) MAINTAINERS: update my e-mail address mod_devicetable: add space before */ scsi: a100u2w: trivial typo in printk i2c: Fix typo in i2c-bfin-twi.c treewide: fix typos in comment blocks Doc: fix trivial typo in SubmittingPatches proportions: Spelling s/consitent/consistent/ dm: Spelling s/consitent/consistent/ aic7xxx: Fix typo in error message pcmcia: Fix typo in locking documentation scsi/arcmsr: Fix typos in error log drm/nouveau/gr: Fix typo in nv10.c [SCSI] Fix printk typos in drivers/scsi staging: comedi: Grammar s/Enable support a/Enable support for a/ Btrfs: Spelling s/consitent/consistent/ README: GTK+ is a acronym ASoC: omap: Fix typo in config option description mm: tlb.c: Fix error message ntfs: super.c: Fix error log fix typo in Documentation/SubmittingPatches ...
2015-08-19Merge tag 'asoc-v4.2-disable-topology' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai2-0/+6
ASoC: Disable topology support for v4.2 The topology code merged in the v4.2 merge window introduced a new ABI which was believed to be suitable for use but subsequently additional work by the developers of this feature have revealed some problems that need to be addressed. In order to allow this to be done without having to support the initial ABI add Kconfig to disable the build and also add some #error statements to the UAPI header so users can't use them.
2015-08-17ASoC: topology: Add Kconfig option for topologyMark Brown2-0/+6
Allow the topology code to be compiled out so that users who don't need topology don't need to havve the code compiled in, saving them some memory. Some more configuration could be added to remove some of the hooks into the core data structures but that is probably best done with some refactoring to use functions to do the updates of the data structures rather than ifdefing in the code as we'd need to do at the minute. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: omap: Fix typo in config option descriptionNik Nyby1-1/+1
This fixes a typo in the description for SND_OMAP_SOC_HDMI_AUDIO. Signed-off-by: Nik Nyby <nikolas@gnu.org> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2015-08-07ASoC: fsl_esai: Spelling s/specifially/specifically/Geert Uytterhoeven1-1/+1
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2015-08-06Merge remote-tracking branches 'asoc/fix/cs4265', 'asoc/fix/intel' and 'asoc/fix/topology' into asoc-linusMark Brown4-23/+52
2015-08-06Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown2-0/+6
2015-08-06ASoC: topology: Update TLV support so we can support more TLV typesMengdong Lin1-17/+41
Currently the TLV topology structure is targeted at only supporting the DB scale data. This patch extends support for the other TLV types so they can be easily added at a later stage. TLV structure is moved to common topology control header since it's a common field for controls and can be processed in a general way. Users must set a proper access flag for a control since it's used to decide if the TLV field is valid and if a TLV callback is needed. Removed the following fields from topology TLV struct: - size/count: type can decide the size. - numid: not needed to initialize TLV for kcontrol. - data: replaced by the type specific struct. Added TLV structure to generic control header and removed TLV structure from mixer control. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-06Merge tag 'asoc-fix-v4.2-rc3' into asoc-fix-topologyMark Brown16-55/+87
ASoC: Fixes for v4.2 A lot of small fixes here, a few to the core: - Fix for binding DAPM stream widgets on devices with prefixes assigned to them - Minor fixes for the newly added topology interfaces - Locking and memory leak fixes for DAPM - Driver specific fixes
2015-08-06ASoC: topology: Add subsequence in topologySubhransu S. Prusty1-0/+1
Some widgets may need sorting within, So add this support in topology. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-04ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()Mengdong Lin1-1/+1
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-03ASoC: rt5645: Fix lost pin setting for DMIC1Bard Liao2-0/+6
I2S2_DAC pin can be used for I2S or GPIO. We should set it as GPIO if we use GPIO5 as DMIC1 data pin. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29ASoC: Intel: sst_byt: fix initialize 'NULL device *' issueJie Yang1-0/+2
Add initialization for sst_byt.dev at init stage, which fix the 'NULL device *' warning issues. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29ASoC: Intel: haswell: fix initialize 'NULL device *' issueJie Yang1-0/+2
Add initialization for sst_hsw.dev at init stage, which fix the 'NULL device *' warning issues. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24ASoC: cs4265: Fix setting dai format for Left/Right JustifiedAxel Lin1-5/+5
The settings in current code does not match the datasheet, fix it. DAC Control - Address 03h DAC Digital Interface Format (Bits 5:4) DAC_DIF1 DAC_DIF0 Description 0 0 Left Justified, up to 24-bit data (default) 0 1 I²S, up to 24-bit data 1 0 Right-Justified, 16-bit Data 1 1 Right-Justified, 24-bit Data Transmitter Control 2 - Address 12h Transmitter Digital Interface Format (Bits 7:6) Tx_DIF1 Tx_DIF0 Description Format Figure 0 0 Left Justified, up to 24-bit data (default) 0 1 I²S, up to 24-bit data 1 0 Right-Justified, 16-bit Data 1 1 Right-Justified, 24-bit Data Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24Merge remote-tracking branches 'asoc/fix/sgtl5000', 'asoc/fix/topology' and 'asoc/fix/zx' into asoc-linusMark Brown4-17/+16
2015-07-24Merge remote-tracking branches 'asoc/fix/fsl-ssi', 'asoc/fix/intel', 'asoc/fix/intel-kconfig' and 'asoc/fix/mediatek' into asoc-linusMark Brown7-19/+41
2015-07-24Merge remote-tracking branch 'asoc/fix/ssm4567' into asoc-linusMark Brown1-1/+7
2015-07-24Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown1-0/+3
2015-07-24Merge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linusMark Brown1-1/+1
2015-07-24Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linusMark Brown2-17/+19
2015-07-24ASoC: pcm1681: Fix setting de-emphasis sampling rate selectionAxel Lin1-1/+1
The de-emphasis sampling rate selection is controlled by BIT[3:4] of PCM1681_DEEMPH_CONTROL register. Do proper left shift to set it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Marek Belisko <marek.belisko@streamunlimited.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-07-22ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmtBen Zhang1-1/+7
The regmap_write in ssm4567_set_dai_fmt accidentally clears the TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot. This patch fixes it by using regmap_update_bits with proper mask. Signed-off-by: Ben Zhang <benzh@chromium.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-07-22ASoC: sgtl5000: Fix up define for SGTL5000_SMALL_POPAxel Lin1-1/+1
Currently, below code actually does not update any bit because SGTL5000_SMALL_POP is 0. snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, SGTL5000_SMALL_POP, 1); The SGTL5000_SMALL_POP should be BIT(0) rather than 0, fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-By: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21ASoC: dapm: Don't add prefix to widget stream nameLars-Peter Clausen1-9/+3
Commit fdb6eb0a1287 ("ASoC: dapm: Modify widget stream name according to prefix") fixed the case where a DAPM route between a DAI widget and a DAC/ADC/AIF widget with a matching stream name was not created when the DAPM context was using a prefix. Unfortunately the patch introduced a few issues on its own like leaking the dynamically allocated stream name memory and also not checking whether the allocation succeeded in the first place. It is also incomplete in that it still does not handle the case where stream name of the widget is a substring of the stream name of the DAI, which is explicitly allowed and works fine if no DAPM prefix is used. Revert the commit and take a slightly different approach to solving the issue. Instead of comparing the widget's stream name to the name of the DAI widget compare it to the stream name of the DAI widget. The stream name of the DAI widget is identical to the name of the DAI widget except that it wont have the DAPM prefix added. So this approach behaves identical regardless to whether the DAPM context uses a prefix or not. We don't have to worry about potentially matching with a widget with the same stream name, but from a different DAPM context with a different prefix, since the code already makes sure that both the DAI widget and the matched widget are from the same DAPM context. Fixes: fdb6eb0a1287 ("ASoC: dapm: Modify widget stream name according to prefix") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-07-17ASoC: rt5645: Check if codec is initialized in workqueue handlerNicolas Boichat1-0/+3
This fixes kernel panic on boot, if rt5645->codec is NULL when rt5645_jack_detect_work is first called. rt5645_jack_detect_work needs rt5645->codec to be initialized to setup dapm pins. Also, reporting jack events is useless, as the jacks cannot be set before the codec is ready. Since we manually call the interrupt handler in rt5645_set_jack_detect, the initial jack state will be reported correctly, and dapm pins will be setup at that time. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15ASoC: Intel: Get correct usage_count value to load firmwareShilpa Sreeramalu1-7/+7
The usage_count variable was read before it was set to the correct value, due to which the firmware load was failing. Because of this IPC messages sent to the firmware were timing out causing a delay of about 1 second while playing audio from the internal speakers. With this patch the usage_count is read after the function call pm_runtime_get_sync which will increment the usage_count variable and the firmware load is successful and all the IPC messages are processed correctly. Signed-off-by: Shilpa Sreeramalu <shilpa.sreeramalu@intel.com> Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-07-14ASoC: topology: Fix to add dapm mixer infoJeeja KP1-1/+1
Mixer control for widgets can't be created if the info is NULL. So assign the correct info for this. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13ASoC: zx: spdif: Fix devm_ioremap_resource return value checkKrzysztof Kozlowski1-2/+2
Value returned by devm_ioremap_resource() was checked for non-NULL but devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of error this could lead to dereference of ERR_PTR. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13ASoC: zx: i2s: Fix devm_ioremap_resource return value checkKrzysztof Kozlowski1-2/+2
Value returned by devm_ioremap_resource() was checked for non-NULL but devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of error this could lead to dereference of ERR_PTR. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-09ASoC: mediatek: Use platform_of_node for machine driversKoro Chen2-8/+28
This replaces the platform_name in snd_soc_dai_link by device tree node. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08ASoC: Free card DAPM context on snd_soc_instantiate_card() error pathLars-Peter Clausen1-0/+1
Make sure the to free the card DAPM context if snd_soc_instantiate_card() fails, otherwise the memory allocated for the DAPM widgets is leaked. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08ASoC: dapm: Fix kcontrol widget name memory managementLars-Peter Clausen1-6/+4
The name field of the widget template is only used inside snd_soc_dapm_new_control_unlocked() which allocates a copy for the actual widget. This means we need to free the name allocated for the template in dapm_kcontrol_data_alloc() and not the name of the actual widget in dapm_kcontrol_free(). Otherwise we get a double free on the widget name and a memory leak on the template name. Fixes: 773da9b358bf ("ASoC: dapm: Append "Autodisable" to autodisable widget names") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-08ASoC: Intel: use CONFIG_SND_SOC for intel boardsVinod Koul1-1/+1
The Intel boards directory was under CONFIG_SND_SOC_INTEL_SST so the machines which don't need these were not allowed to be selected/compiled without enabling this symbol The machine should be allowed to selected by ASoC and then they should select rest of symbols required Reported-by: Michele Curti <michele.curti@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07ASoC: fsl-ssi: Fix bitclock calculation for master modeJuergen Borleis1-1/+1
According to the datasheet 'pm', 'psr' and 'div2' should never be all 0. Since commit 541b03ad6cfe ("ASoC: fsl_ssi: Fix the incorrect limitation of the bit clock rate") this can happen, because for some bitclock rates 'pm' = 0 seems to be a valid choice but does not work due to hardware restrictions. This results into a bad hardware behaviour (slow audio for example). Feature tested on a i.MX25. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06ASoC: Intel: fix incorrect widget nameFang, Yang A1-2/+2
We should use "HiFi Playback" and "HiFi Capture".it will fix below err cht-bsw-max98090: ASoC: no sink widget found for AIF1 Playback cht-bsw-max98090: ASoC: Failed to add route ssp2 Tx -> direct -> AIF1 Playback cht-bsw-max98090: ASoC: no source widget found for AIF1 Capture cht-bsw-max98090: ASoC: Failed to add route AIF1 Capture -> direct -> ssp2 Rx Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-06ASoC: dapm: Lock during userspace accessLars-Peter Clausen1-0/+9
The DAPM lock must be held when accessing the DAPM graph status through sysfs or debugfs, otherwise concurrent changes to the graph can result in undefined behaviour. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-07-02ASoC: topology: Fix TLV size calculation.Liam Girdwood1-11/+10
TLV size calculation was incorrectly calculated. Fix this according to include/sound/tlv.h Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-26ASoC: dapm: Fix deadlock on auto-disable mux controlsCharles Keepax1-2/+2
The commit 02aa78abec6e ("ASoC: DAPM: Add APIs to create individual DAPM controls.") added locking to the snd_soc_dapm_new_control function but did not update the call to snd_soc_dapm_new_control in the auto-disable mux code, this appears to be because the patches were sent at fairly similar times. This patch change the call in the auto-disable mux code to use the new snd_soc_dapm_new_control_unlocked function instead. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-25Merge tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/soundLinus Torvalds216-3055/+11912
Pull sound updates from Takashi Iwai: "It was a busy development cycle at this time, as you can see a wide range of changes in diffstat. There are no big changes but many refactoring and improvements. Here we go some highlights: ALSA core: - Procfs codes were cleaned up to use seq_file - Procfs can be opt out via Kconfig (only for EXPERT) - Two types of jack API were unified finally; now both kctl and input jack devs are handled via a single function call. HD-audio: - Continued code restructuring for the future ASoC driver; now HDA controller driver is split to a core helper module. - Preliminary codes for Skylake audio support in HDA core. - Proper i915 gfx power well management for SKL & co - Enabled runtime PM as default for Intel HDMI/DP codecs - Newer Tegra chip supports - More quirks for Dell headsets, Alienware (with CA0132), etc. - A couple of DRM ELD helper API functions ASoC: - Support for loading ASoC topology maps from firmware, intended to be used to allow self-describing DSP firmware images to be built which can map controls added by the DSP to userspace without the kernel needing to know about individual DSP firmwares - Lots of refactoring to avoid direct access to snd_soc_codec where it's not needed supporting future refactoring - Big refactoring, cleanup and enhancement for the Wolfson ADSP driver - Cleanup series for TI TAS2552 and R-CAR drivers - Fixes and improvements on RT56xx codecs - Support for TI TAS571x power amplifiers - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs - Support for x86 systems with RT5650 and Qualcomm Storm - Support for Mediatek AFE (Audio Front End) unit - Other various small fixes to ASoC codec drivers Firewire: - Enhanced to allow non-blocking streams to use timestamp synchronization - Improve support for DM1500 and BeBoBv3 Misc: - Cleanup of old pci API functions over all PCI sound drivers - Fix long-standing regression of the old powermac i2c setup" * tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (533 commits) ALSA: pcm: Fix pcm_class sysfs output ALSA: hda-beep: Update authors dead email address ASoC: wm_adsp: Move DSP Rate controls into the codec ASoC: wm8995: Fix setting sysclk for WM8995_SYSCLK_MCLK2 case ALSA: hda: provide default bus io ops extended hdac ALSA: hda: add hda link cleanup routine ALSA: hda: add hdac_ext stream creation and cleanup routines ASoC: rsrc-card: remove unused ret ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core ASoC: mediatek: Add machine driver for rt5650 rt5676 codec ASoC: mediatek: Add machine driver for MAX98090 codec ASoC: mediatek: Add AFE platform driver ASoC: rsnd: remove io from rsnd_mod ASoC: rsnd: move rsnd_mod_is_working() to rsnd_io_is_working() ASoC: rsnd: don't use rsnd_mod_to_io() on snd_kcontrol ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_src_xxx() ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_ssi_xxx() ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_dma_xxx() ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_get_adinr() ASoC: rsnd: add common interrupt handler for SSI/SRC/DMA ...
2015-06-23Merge tag 'fbdev-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linuxLinus Torvalds1-5/+7
Pull fbdev updates from Tomi Valkeinen: - ssd1307fb: various fixes and improvements, SSD1305 support - use architecture agnostic functions instead of MTRR functions in various fbdev drivers - TI DRA7xx SoC display support (arch/arm/ side) - OMAPDSS componentization to fix probing order issues - OMAPDSS scaling fixes - msm_fb: remove obsoleted driver * tag 'fbdev-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (77 commits) msm: msm_fb: Remove dead code OMAPDSS: HDMI: wait for framedone when stopping video OMAPDSS: HDMI4: fix error handling OMAPDSS: DISPC: scaler debug print OMAPDSS: DISPC: do only y decimation on OMAP3 OMAPDSS: DISPC: check if scaling setup failed OMAPDSS: DISPC: fix 64 bit issue in 5-tap OMAPDSS: DISPC: fix row_inc for OMAP3 OMAPDSS: DISPC: add check for scaling limits OMAPDSS: DISPC: fix check_horiz_timing_omap3 args OMAPDSS: DISPC: fix predecimation for YUV modes OMAPDSS: DISPC: work-around for errata i631 OMAPDSS: simplify submodule reg/unreg code OMAPDSS: componentize omapdss OMAPDSS: reorder uninit calls OMAPDSS: remove uses of __init/__exit OMAPDSS: fix dss_init_ports error handling OMAPDSS: refactor dss probe function OMAPDSS: move 'dss_initialized' to dss driver fbdev: propagate result of fb_videomode_from_videomode() ...
2015-06-23Merge branch 'for-linus-clk' of git://ftp.arm.linux.org.uk/~rmk/linux-armLinus Torvalds1-2/+1
Pull clkdev updates from Russell King: "This series addresses some breakage in clkdev caused by a previous patch set from the clk tree which introduced per-user clk structures. This basically renamed the existing 'struct clk' to 'struct clk_hw', and introduced a new 'struct clk'. This change will break anyone using clk_add_alias() with the common clk code enabled. Thankfully, the intersection of users of clk_add_alias() and those using the common clk code is practically zero, but this is something which should be fixed to keep the code sane. The problem is that clk_add_alias() does this: r = clk_get(...); l = clkdev_alloc(r, ...); clk_put(...); which causes the alias to store a pointer to 'r', which has been freed. The original patch set tried to work around this problem incorrectly - at clk_get() time, it tried to convert the struct clk to a struct clk_hw, and then creating a new struct clk from that. Clearly, if the original struct clk has been freed, then we have a use-after-free bug. We have other places in the tree which do something similar, so this series also addresses those locations too. This series addresses this problem by converting clkdev to store and use the clk_hw pointer. This allows clk_get() to only have to create it's per-user struct clk from the clk_hw. We can also get to the desired clk_hw at clk_add_alias() or clk lookup creation time, when the struct clk is "alive". We also perform some cleanups of the code: - replacing looped calls to clkdev_add() with clkdev_add_table() - replacing open-coded lookup allocation (which should have been using clkdev_alloc()) and subsequent clkdev_add() with clkdev_create() - replacing open-coded clk_add_alias() with clk_add_alias()" * 'for-linus-clk' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: clk: s2mps11: use clkdev_create() ASoC: migor: use clkdev_create() ARM: omap2: use clkdev_add_alias() ARM: omap2: use clkdev_create() ARM: orion: use clkdev_create() ARM: lpc32xx: convert to use clkdev_add_table() SH: use clkdev_add_table() clkdev: add clkdev_create() helper clkdev: const-ify connection id to clk_add_alias() clkdev: get rid of redundant clk_add_alias() prototype in linux/clk.h clkdev: drop __init from clkdev_add_table() clk: update clk API documentation to clarify clk_round_rate() clkdev: use clk_hw internally
2015-06-23ASoC: mediatek: Fix unbalanced calls to runtime suspend/resumeKoro Chen1-0/+2
This adds call to runtime suspend in dev remove. It fixs the problem that suspend is not called in the case of CONFIG_PM=n. It also fixs build warning when CONFIG_PM=n. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-22Merge tag 'asoc-v4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai8-50/+48
ASoC: A couple more updates for v4.2 These were sitting on my laptop.
2015-06-22Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown1-2/+0
2015-06-22Merge remote-tracking branch 'asoc/topic/arizona' into asoc-nextMark Brown7-48/+48
2015-06-22Merge tag 'asoc-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai53-889/+3501
ASoC: Further updates for v4.2 There's a bunch of additional updates and fixes that came in since my orignal pull request here, including DT support for rt5645 and fairly large serieses of cleanups and improvements to tas2552 and rcar.
2015-06-22Merge remote-tracking branch 'asoc/topic/wm8995' into asoc-nextMark Brown1-1/+1
2015-06-22Merge remote-tracking branches 'asoc/topic/wm8523' and 'asoc/topic/wm8741' into asoc-nextMark Brown2-35/+52
2015-06-22Merge remote-tracking branch 'asoc/topic/tas2552' into asoc-nextMark Brown2-91/+152