Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ASoC: codecs: Simplify mclk initialization
@ 2024-02-21 15:25 Cezary Rojewski
  2024-02-21 15:25 ` [PATCH 1/6] ASoC: codecs: da7213: " Cezary Rojewski
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Cezary Rojewski @ 2024-02-21 15:25 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, linux-sound, tiwai, perex, amadeuszx.slawinski,
	pierre-louis.bossart, hdegoede, Cezary Rojewski

The patchset may not cover all codecs found in the codecs/ directory -
noticed a possible improvement and grepped for similar pattern across C
files found in the directory. Those addressed here seem pretty
straightforward.

Most of clk_xxx() functions do check if provided clk-pointer is
non-NULL. These do not check if the pointer is an error-pointer.
Providing such to a clk_xxx() results in a panic.

By utilizing _optional() variant of devm_clk_get() the driver code is
both simplified and more robust. There is no need to remember about
IS_ERR(clk) checks each time mclk is accessed.

Cezary Rojewski (6):
  ASoC: codecs: da7213: Simplify mclk initialization
  ASoC: codecs: nau8825: Simplify mclk initialization
  ASoC: codecs: rt5514: Simplify mclk initialization
  ASoC: codecs: rt5616: Simplify mclk initialization
  ASoC: codecs: rt5640: Simplify mclk initialization
  ASoC: codecs: rt5660: Simplify mclk initialization

 sound/soc/codecs/da7213.c  | 12 ++++--------
 sound/soc/codecs/nau8825.c | 12 ++++--------
 sound/soc/codecs/rt5514.c  |  9 +++------
 sound/soc/codecs/rt5616.c  |  9 +++------
 sound/soc/codecs/rt5640.c  |  9 +++------
 sound/soc/codecs/rt5660.c  |  9 +++------
 6 files changed, 20 insertions(+), 40 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-26 19:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 15:25 [PATCH 0/6] ASoC: codecs: Simplify mclk initialization Cezary Rojewski
2024-02-21 15:25 ` [PATCH 1/6] ASoC: codecs: da7213: " Cezary Rojewski
2024-02-21 15:25 ` [PATCH 2/6] ASoC: codecs: nau8825: " Cezary Rojewski
2024-02-21 15:25 ` [PATCH 3/6] ASoC: codecs: rt5514: " Cezary Rojewski
2024-02-21 15:25 ` [PATCH 4/6] ASoC: codecs: rt5616: " Cezary Rojewski
2024-02-21 15:25 ` [PATCH 5/6] ASoC: codecs: rt5640: " Cezary Rojewski
2024-02-21 15:25 ` [PATCH 6/6] ASoC: codecs: rt5660: " Cezary Rojewski
2024-02-26 19:28 ` [PATCH 0/6] ASoC: codecs: " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox