* [PATCH 6/7] leds-lm3530: replace 'pltfm' with 'pdata'
@ 2012-01-20 1:51 ` Kim, Milo
2012-01-23 19:19 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Kim, Milo @ 2012-01-20 1:51 UTC (permalink / raw)
To: Linus Walleij, shreshthakumar.sahu; +Cc: linux-kernel, rpurdie
Use 'pdata' rather than 'pltfm' in lm3530_init_registers().
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c
index 89b667b..51c1f6c 100644
--- a/drivers/leds/leds-lm3530.c
+++ b/drivers/leds/leds-lm3530.c
@@ -150,11 +150,11 @@ static int lm3530_init_registers(struct lm3530_data *drvdata)
u8 als_imp_sel = 0;
u8 brightness;
u8 reg_val[LM3530_REG_MAX];
- struct lm3530_platform_data *pltfm = drvdata->pdata;
+ struct lm3530_platform_data *pdata = drvdata->pdata;
struct i2c_client *client = drvdata->client;
- gen_config = (pltfm->brt_ramp_law << LM3530_RAMP_LAW_SHIFT) |
- ((pltfm->max_current & 7) << LM3530_MAX_CURR_SHIFT);
+ gen_config = (pdata->brt_ramp_law << LM3530_RAMP_LAW_SHIFT) |
+ ((pdata->max_current & 7) << LM3530_MAX_CURR_SHIFT);
if (drvdata->mode == LM3530_BL_MODE_MANUAL ||
drvdata->mode == LM3530_BL_MODE_ALS)
@@ -162,27 +162,27 @@ static int lm3530_init_registers(struct lm3530_data *drvdata)
if (drvdata->mode == LM3530_BL_MODE_ALS) {
als_config =
- (pltfm->als_avrg_time << LM3530_ALS_AVG_TIME_SHIFT) |
+ (pdata->als_avrg_time << LM3530_ALS_AVG_TIME_SHIFT) |
(LM3530_ENABLE_ALS) |
- (pltfm->als_input_mode << LM3530_ALS_SEL_SHIFT);
+ (pdata->als_input_mode << LM3530_ALS_SEL_SHIFT);
als_imp_sel =
- (pltfm->als1_resistor_sel << LM3530_ALS1_IMP_SHIFT) |
- (pltfm->als2_resistor_sel << LM3530_ALS2_IMP_SHIFT);
+ (pdata->als1_resistor_sel << LM3530_ALS1_IMP_SHIFT) |
+ (pdata->als2_resistor_sel << LM3530_ALS2_IMP_SHIFT);
}
if (drvdata->mode == LM3530_BL_MODE_PWM)
gen_config |= (LM3530_ENABLE_PWM) |
- (pltfm->pwm_pol_hi << LM3530_PWM_POL_SHIFT) |
+ (pdata->pwm_pol_hi << LM3530_PWM_POL_SHIFT) |
(LM3530_ENABLE_PWM_SIMPLE);
- brt_ramp = (pltfm->brt_ramp_fall << LM3530_BRT_RAMP_FALL_SHIFT) |
- (pltfm->brt_ramp_rise << LM3530_BRT_RAMP_RISE_SHIFT);
+ brt_ramp = (pdata->brt_ramp_fall << LM3530_BRT_RAMP_FALL_SHIFT) |
+ (pdata->brt_ramp_rise << LM3530_BRT_RAMP_RISE_SHIFT);
if (drvdata->brightness)
brightness = drvdata->brightness;
else
- brightness = drvdata->brightness = pltfm->brt_val;
+ brightness = drvdata->brightness = pdata->brt_val;
reg_val[0] = gen_config; /* LM3530_GEN_CONFIG */
reg_val[1] = als_config; /* LM3530_ALS_CONFIG */
@@ -200,7 +200,7 @@ static int lm3530_init_registers(struct lm3530_data *drvdata)
reg_val[13] = LM3530_DEF_ZT_3; /* LM3530_ALS_Z3T_REG */
reg_val[14] = LM3530_DEF_ZT_4; /* LM3530_ALS_Z4T_REG */
- if (!drvdata->enable && !pltfm->is_vin_always_on) {
+ if (!drvdata->enable && !pdata->is_vin_always_on) {
ret = regulator_enable(drvdata->regulator);
if (ret) {
dev_err(&drvdata->client->dev,
--
1.7.4.1
Best Regards,
Milo (Woogyom) Kim
Texas Instruments Incorporated
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6/7] leds-lm3530: replace 'pltfm' with 'pdata'
2012-01-20 1:51 ` [PATCH 6/7] leds-lm3530: replace 'pltfm' with 'pdata' Kim, Milo
@ 2012-01-23 19:19 ` Linus Walleij
2012-01-25 1:54 ` Kim, Milo
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2012-01-23 19:19 UTC (permalink / raw)
To: Kim, Milo; +Cc: shreshthakumar.sahu, linux-kernel, rpurdie
On Fri, Jan 20, 2012 at 2:51 AM, Kim, Milo <Milo.Kim@ti.com> wrote:
> Use 'pdata' rather than 'pltfm' in lm3530_init_registers().
>
> Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
You're ringht this is a more common naming.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
...but it won't apply because i NACKed the regulator avoidance
patch... so it'll need updating.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 6/7] leds-lm3530: replace 'pltfm' with 'pdata'
2012-01-23 19:19 ` Linus Walleij
@ 2012-01-25 1:54 ` Kim, Milo
0 siblings, 0 replies; 3+ messages in thread
From: Kim, Milo @ 2012-01-25 1:54 UTC (permalink / raw)
To: Linus Walleij; +Cc: shreshthakumar.sahu, linux-kernel, rpurdie
Updated patch has been sent.
Title : [PATCH v2 2/2] leds-lm3530: replace 'pltfm' with 'pdata'
Thanks & BR
Milo -
-----Original Message-----
From: Linus Walleij [mailto:linus.walleij@linaro.org]
Sent: Tuesday, January 24, 2012 4:19 AM
To: Kim, Milo
Cc: shreshthakumar.sahu@stericsson.com; linux-kernel@vger.kernel.org; rpurdie@rpsys.net
Subject: Re: [PATCH 6/7] leds-lm3530: replace 'pltfm' with 'pdata'
On Fri, Jan 20, 2012 at 2:51 AM, Kim, Milo <Milo.Kim@ti.com> wrote:
> Use 'pdata' rather than 'pltfm' in lm3530_init_registers().
>
> Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
You're ringht this is a more common naming.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
...but it won't apply because i NACKed the regulator avoidance
patch... so it'll need updating.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-25 1:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AczXFgV8f/jdU5qUSd6MQcwmtcr9IA==>
2012-01-20 1:51 ` [PATCH 6/7] leds-lm3530: replace 'pltfm' with 'pdata' Kim, Milo
2012-01-23 19:19 ` Linus Walleij
2012-01-25 1:54 ` Kim, Milo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).