diff options
author | Mike Rapoport <mike.rapoport@gmail.com> | 2016-02-10 19:33:57 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-12 06:52:37 +0300 |
commit | 5557eb17b3f14b92f2512d43ff6d68c6f0a609ef (patch) | |
tree | 9f3466352790d3f915557c6dc0e5cbd868907097 /drivers/staging/sm750fb/ddk750_display.c | |
parent | 79254c60db6a5cbb72a9cb5eb1c3c50d6cdf755a (diff) | |
download | linux-5557eb17b3f14b92f2512d43ff6d68c6f0a609ef.tar.xz |
staging: sm750fb: use BIT macro for PLL_CTRL single-bit fields
Replace complex defintion of PLL_CTRL fields with BIT() macro and use
open-coded implementation for PLL register manipulations.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb/ddk750_display.c')
-rw-r--r-- | drivers/staging/sm750fb/ddk750_display.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c index 5d1f9a517388..a82253c749c6 100644 --- a/drivers/staging/sm750fb/ddk750_display.c +++ b/drivers/staging/sm750fb/ddk750_display.c @@ -126,8 +126,7 @@ static void waitNextVerticalSync(int ctrl, int delay) /* Do not wait when the Primary PLL is off or display control is already off. This will prevent the software to wait forever. */ - if ((FIELD_GET(PEEK32(PANEL_PLL_CTRL), PLL_CTRL, POWER) == - PLL_CTRL_POWER_OFF) || + if (!(PEEK32(PANEL_PLL_CTRL) & PLL_CTRL_POWER) || (FIELD_GET(PEEK32(PANEL_DISPLAY_CTRL), PANEL_DISPLAY_CTRL, TIMING) == PANEL_DISPLAY_CTRL_TIMING_DISABLE)) { return; @@ -149,8 +148,7 @@ static void waitNextVerticalSync(int ctrl, int delay) /* Do not wait when the Primary PLL is off or display control is already off. This will prevent the software to wait forever. */ - if ((FIELD_GET(PEEK32(CRT_PLL_CTRL), PLL_CTRL, POWER) == - PLL_CTRL_POWER_OFF) || + if (!(PEEK32(CRT_PLL_CTRL) & PLL_CTRL_POWER) || (FIELD_GET(PEEK32(CRT_DISPLAY_CTRL), CRT_DISPLAY_CTRL, TIMING) == CRT_DISPLAY_CTRL_TIMING_DISABLE)) { return; |