[PATCH 4/7 v2] video: ARM CLCD: support pads connected in reverse order
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Feb 23 02:35:18 PST 2016
On Tue, Feb 23, 2016 at 11:01:41AM +0100, Linus Walleij wrote:
> - if (var->red.offset == 0)
> - val &= ~CNTL_BGR;
> - else
> - val |= CNTL_BGR;
> + if (!fb->panel->bgr_connection) {
> + if (var->red.offset == 0)
> + val &= ~CNTL_BGR;
> + else
> + val |= CNTL_BGR;
> + } else {
> + if (var->blue.offset == 0)
> + val &= ~CNTL_BGR;
> + else
> + val |= CNTL_BGR;
> + }
if (fb->panel->bgr_connection)
val ^= CNTL_BGR;
is a shorter way to write the above, and probably easier on the compiler
too.
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
More information about the linux-arm-kernel
mailing list