Skip to content

Commit

Permalink
ARM: pxafb: Fix access to nonexistent member of pxafb_info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Vasut authored and Eric Miao committed Apr 12, 2011
1 parent a6360dd commit a6d710f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,9 @@ pxafb_freq_transition(struct notifier_block *nb, unsigned long val, void *data)

switch (val) {
case CPUFREQ_PRECHANGE:
if (!fbi->overlay[0].usage && !fbi->overlay[1].usage)
#ifdef CONFIG_FB_PXA_OVERLAY
if (!(fbi->overlay[0].usage || fbi->overlay[1].usage))
#endif
set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE);
break;

Expand Down

0 comments on commit a6d710f

Please sign in to comment.