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. -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html