[PATCH 0/6] ASoC: codecs: Simplify mclk initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux