diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2011-03-22 08:09:50 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2011-04-12 11:07:42 -0400 |
commit | a6d710fefd1b2c209353a452d0f4c831b3af0da0 (patch) | |
tree | cbfa219b9a73c490eb7a66e1947fe5d63af02a7f | |
parent | a6360dd37e1a144ed11e6548371bade559a1e4df (diff) |
ARM: pxafb: Fix access to nonexistent member of pxafb_info
In case CONFIG_FB_PXA_OVERLAY is not defined, the pxafb_freq_transition()
function tests nonexistent member of pxafb_info (since the member is not
part of the structure).
Fix this by wraping the test in ifdef, even if I don't really like how the code
looks now. The check doesn't have to happen if overlays are disabled at all as
the check is always true then.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | drivers/video/pxafb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index a2e5b5100ab4..0f4e8c942f9e 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -1648,7 +1648,9 @@ pxafb_freq_transition(struct notifier_block *nb, unsigned long val, void *data) | |||
1648 | 1648 | ||
1649 | switch (val) { | 1649 | switch (val) { |
1650 | case CPUFREQ_PRECHANGE: | 1650 | case CPUFREQ_PRECHANGE: |
1651 | if (!fbi->overlay[0].usage && !fbi->overlay[1].usage) | 1651 | #ifdef CONFIG_FB_PXA_OVERLAY |
1652 | if (!(fbi->overlay[0].usage || fbi->overlay[1].usage)) | ||
1653 | #endif | ||
1652 | set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE); | 1654 | set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE); |
1653 | break; | 1655 | break; |
1654 | 1656 | ||