Subject: [PATCH 3/3] mmc: meson-gx: improve meson_mmc_clk_set

From: [email-masked] (Kevin Hilman)
Date: Fri, 27 Jan 2017 10:03:45 -0800

Heiner Kallweit <[email-masked]> 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 <[email-masked]>

All nice cleanup, thanks!

Reviewed-by: Kevin Hilman <[email-masked]>
Tested-by: Kevin Hilman <[email-masked]>

Kevin