* [PATCH 1/3] backlight: kb3886_bl: fix incorrect placement of __initdata marker
@ 2014-01-07 1:30 Jingoo Han
2014-01-07 1:31 ` [PATCH 2/3] backlight: lp855x: remove unnecessary parentheses Jingoo Han
2014-01-07 1:32 ` [PATCH 3/3] backlight: lp8788: " Jingoo Han
0 siblings, 2 replies; 3+ messages in thread
From: Jingoo Han @ 2014-01-07 1:30 UTC (permalink / raw)
To: 'Andrew Morton'; +Cc: linux-kernel, 'Jingoo Han'
The __initdata marker can be virtually anywhere on the line,
EXCEPT right after "struct". The preferred location is before
the "=" sign if there is one, or before the trailing ";" otherwise.
It also fixes the following chechpatch warning.
WARNING: __initdata should be placed after kb3886bl_device_table[]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/video/backlight/kb3886_bl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c
index 7592cc2..84a110a 100644
--- a/drivers/video/backlight/kb3886_bl.c
+++ b/drivers/video/backlight/kb3886_bl.c
@@ -78,7 +78,7 @@ static struct kb3886bl_machinfo *bl_machinfo;
static unsigned long kb3886bl_flags;
#define KB3886BL_SUSPENDED 0x01
-static struct dmi_system_id __initdata kb3886bl_device_table[] = {
+static struct dmi_system_id kb3886bl_device_table[] __initdata = {
{
.ident = "Sahara Touch-iT",
.matches = {
--
1.7.10.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/3] backlight: lp855x: remove unnecessary parentheses
2014-01-07 1:30 [PATCH 1/3] backlight: kb3886_bl: fix incorrect placement of __initdata marker Jingoo Han
@ 2014-01-07 1:31 ` Jingoo Han
2014-01-07 1:32 ` [PATCH 3/3] backlight: lp8788: " Jingoo Han
1 sibling, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2014-01-07 1:31 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Jingoo Han', 'Milo Kim'
Remove unnecessary parentheses in order to fix the following
checkpatch error.
ERROR: return is not a function, parentheses are not required
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/video/backlight/lp855x_bl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
index cae80d5..2ca3a04 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -125,7 +125,7 @@ static bool lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
return false;
}
- return (addr >= start && addr <= end);
+ return addr >= start && addr <= end;
}
static int lp8557_bl_off(struct lp855x *lp)
--
1.7.10.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] backlight: lp8788: remove unnecessary parentheses
2014-01-07 1:30 [PATCH 1/3] backlight: kb3886_bl: fix incorrect placement of __initdata marker Jingoo Han
2014-01-07 1:31 ` [PATCH 2/3] backlight: lp855x: remove unnecessary parentheses Jingoo Han
@ 2014-01-07 1:32 ` Jingoo Han
1 sibling, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2014-01-07 1:32 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Jingoo Han', 'Milo Kim'
Remove unnecessary parentheses in order to fix the following
checkpatch error.
ERROR: return is not a function, parentheses are not required
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/video/backlight/lp8788_bl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c
index e49905d..daba34d 100644
--- a/drivers/video/backlight/lp8788_bl.c
+++ b/drivers/video/backlight/lp8788_bl.c
@@ -63,13 +63,13 @@ static struct lp8788_bl_config default_bl_config = {
static inline bool is_brightness_ctrl_by_pwm(enum lp8788_bl_ctrl_mode mode)
{
- return (mode == LP8788_BL_COMB_PWM_BASED);
+ return mode == LP8788_BL_COMB_PWM_BASED;
}
static inline bool is_brightness_ctrl_by_register(enum lp8788_bl_ctrl_mode mode)
{
- return (mode == LP8788_BL_REGISTER_ONLY ||
- mode == LP8788_BL_COMB_REGISTER_BASED);
+ return mode == LP8788_BL_REGISTER_ONLY ||
+ mode == LP8788_BL_COMB_REGISTER_BASED;
}
static int lp8788_backlight_configure(struct lp8788_bl *bl)
--
1.7.10.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-07 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-07 1:30 [PATCH 1/3] backlight: kb3886_bl: fix incorrect placement of __initdata marker Jingoo Han
2014-01-07 1:31 ` [PATCH 2/3] backlight: lp855x: remove unnecessary parentheses Jingoo Han
2014-01-07 1:32 ` [PATCH 3/3] backlight: lp8788: " Jingoo Han
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome