From: anarsoul@gmail.com (Vasily Khoruzhick)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxafb: Fix access to nonexistent member of pxafb_info
Date: Wed, 23 Mar 2011 11:15:52 +0200 [thread overview]
Message-ID: <201103231115.53082.anarsoul@gmail.com> (raw)
In-Reply-To: <1300796054-18697-1-git-send-email-marek.vasut@gmail.com>
On Tuesday 22 March 2011 14:14:14 Marek Vasut wrote:
> 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.
Ok, but how you're going to implement it if overlay support is enabled, but
SoC does not support it?
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
> 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 a2e5b51..0f4e8c9 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)
>
> 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;
next prev parent reply other threads:[~2011-03-23 9:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 12:14 [PATCH] ARM: pxafb: Fix access to nonexistent member of pxafb_info Marek Vasut
2011-03-23 9:15 ` Vasily Khoruzhick [this message]
2011-03-23 14:54 ` Marek Vasut
2011-03-23 15:05 ` Vasily Khoruzhick
2011-03-26 15:49 ` Eric Miao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103231115.53082.anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).