[PATCH 3/3] mmc: meson-gx: improve meson_mmc_clk_set
Kevin Hilman
khilman at baylibre.com
Fri Jan 27 10:03:45 PST 2017
Heiner Kallweit <hkallweit1 at gmail.com> writes:
> The following changes are quite small, therefore I combined them in
> one patch. If you'd prefer to separate the changes just let me know.
>
> - 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.
> - In the case of actual frequency not exactly matching the requested
> one set mmc->actual_clock to the requested frequency.
> So far mmc->actual_clock wasn't set at all in this case.
>
> Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
All nice cleanup, thanks!
Reviewed-by: Kevin Hilman <khilman at baylibre.com>
Tested-by: Kevin Hilman <khilman at baylibre.com>
Kevin
More information about the linux-arm-kernel
mailing list