From: Ian Campbell <ijc+uboot@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default
Date: Sun, 08 Mar 2015 09:04:48 +0000 [thread overview]
Message-ID: <1425805488.27083.24.camel@hellion.org.uk> (raw)
In-Reply-To: <1425737102-930-1-git-send-email-hdegoede@redhat.com>
On Sat, 2015-03-07 at 15:04 +0100, Hans de Goede wrote:
> Fix a type in board/sunxi/Kconfig which caused VIDEO_LCD_PANEL_I2C to be
"typo"
> +#define CONFIG_VIDEO_LCD_I2C_BUS 1 /* NA, but necessary to compile */
Hrm, should the usage sites not be either ifdef'd or excluded at the
Makefile level when VIDEO_LCD_PANEL_I2C is disabled?
The only use is in
if (IS_ENABLED(CONFIG_VIDEO_LCD_TL059WV5C0)) {
unsigned int orig_i2c_bus = i2c_get_bus_num();
i2c_set_bus_num(CONFIG_VIDEO_LCD_I2C_BUS);
i2c_reg_write(0x5c, 0x04, 0x42); /* Turn on the LCD */
i2c_set_bus_num(orig_i2c_bus);
}
Is the issue that the IS_ENABLED statically false but the compiler still
wants the contents to be valid?
How about a helper set_video_i2c_bus or some such which can be a nop if
CONFIG_VIDEO_LCD_I2C_BUS is not defined, which would keep the ifdef out
of this code?
Or at least #define it to some obviously bogus value (e.g. ~0UL).
Ian.
next prev parent reply other threads:[~2015-03-08 9:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1425737102-930-1-git-send-email-hdegoede@redhat.com>
[not found] ` <1425737102-930-2-git-send-email-hdegoede@redhat.com>
2015-03-07 19:00 ` [U-Boot] [PATCH 2/4] sun7i: Add support for the Wits Pro A20 DKT board Hans de Goede
2015-03-08 9:08 ` Ian Campbell
2015-03-08 9:04 ` Ian Campbell [this message]
2015-03-10 11:38 ` [U-Boot] [PATCH 1/4] sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default Hans de Goede
2015-03-10 12:17 ` Ian Campbell
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=1425805488.27083.24.camel@hellion.org.uk \
--to=ijc+uboot@hellion.org.uk \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.