backlight: 88pm860x_bl: fix build failure
Subsystems (2)
PATCH 1/1 backlight: 88pm860x_bl: fix build failure
On x86_64 system this driver fails to build, since theres already a macro called CURRENT_MASK in arch/asm/include/page_64_types.h So I renamed this macro to BL_CURRENT_MASK to aviod a collision.
---
This patch is against Linux tree and tested.
drivers/video/backlight/88pm860x_bl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/88pm860x_bl.c +2 -2
@@ -21,7 +21,7 @@#define MAX_BRIGHTNESS (0xFF)#define MIN_BRIGHTNESS (0) -#define CURRENT_MASK (0x1F << 1) +#define BL_CURRENT_MASK (0x1F << 1)struct pm860x_backlight_data {struct pm860x_chip *chip;
@@ -85,7 +85,7 @@ static int pm860x_backlight_set(struct backlight_device *bl, int brightness)if ((data->current_brightness ==0 ) && brightness) {if (data->iset) { ret =pm860x_set_bits (data->i2c,wled_idc (data->port), -CURRENT_MASK , data->iset); +BL_CURRENT_MASK , data->iset);if (ret <0 ) goto out; }
Signature · 1 line
1.7.0.4
Quoted 1 line · On Fri, 20 Aug 2010 20:01:55 +0200 Henrik Kretzschmar wrote:
On
x86_64system this driver fails to build, since theres already a
fails as in an error, not just a warning?
I see this:
drivers/video/backlight/88pm860x_bl.c:24:1: warning: "CURRENT_MASK" redefined arch/x86/include/asm/page_64_types.h:6:1: warning: this is the location of the previous definition
Quoted 25 lines
macro called
CURRENT_MASKinarch/asm/include/page_64_types.hSo I renamed this macro toBL_CURRENT_MASKto aviod a collision.Signed-off-by Henrik Kretzschmar <[email protected]>---
This patch is against Linux tree and tested.drivers/video/backlight/88pm860x_bl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/video/backlight/88pm860x_bl.c +1
-1@@ -21,7 +21,7 @@#define MAX_BRIGHTNESS (0xFF)#define MIN_BRIGHTNESS (0) -#define CURRENT_MASK (0x1F << 1) +#define BL_CURRENT_MASK (0x1F << 1)struct pm860x_backlight_data {struct pm860x_chip *chip;
drivers/video/backlight/88pm860x_bl.c static int pm860x_backlight_set(struct backlight_device *bl, int brightness) · line 91
Quoted 8 lines
drivers/video/backlight/88pm860x_bl.c +1
-1@@ -85,7 +85,7 @@ static int pm860x_backlight_set(struct backlight_device *bl, int brightness)if ((data->current_brightness ==0 ) && brightness) {if (data->iset) { ret =pm860x_set_bits (data->i2c,wled_idc (data->port), -CURRENT_MASK , data->iset); +BL_CURRENT_MASK , data->iset);if (ret <0 ) goto out; }
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***