]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mmc: meson-gx: improve meson_mmc_clk_set
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 7 Feb 2017 21:34:32 +0000 (22:34 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 14 Feb 2017 08:10:55 +0000 (09:10 +0100)
commit5da86887638d7a833c75880b7fd8ba738aa102a7
treebff55d8b6dff3f320f9d6fec1174e4387599a593
parent3d45c86f92be4cd22b4d2332a5cc280e20efedc6
mmc: meson-gx: improve meson_mmc_clk_set

The following changes are quite small, therefore I combined them in
one patch.

- ret doesn't need to be initialized with 0
- use standard !clk_rate notation to check for a zero value
- If clk_rate is zero we return here. Therefore all further checks
  in this function for clk_rate != 0 are not needed.
- switch from dev_warn to dev_err if the clock can't be set
- If due to clock source and available divider values the requested
  frequency isn't matched exactly (always the case if requested
  frequency is 52 MHz), then just print the differing values as
  debug message and not as warning.
- Also remove ret from the message as it is always 0.
- Set member current_clock to the current requested rate and
  mmc->actual_clock to the current actual rate

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-gx-mmc.c