diff options
author | Kim, Milo <Milo.Kim@ti.com> | 2012-03-23 18:02:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:35 -0400 |
commit | 99ad98d25961487d83ac4afac0375fe1f3e5c883 (patch) | |
tree | 6213b46d2afd51e679fb2c918dce3c1d5f73258b /drivers/leds | |
parent | 8544d0e3f6cd2d12af6d68992b15a6b3f5d35c2e (diff) |
leds-lm3530: replace pltfm with pdata
Use 'pdata' rather than 'pltfm' in lm3530_init_registers().
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-lm3530.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index d70c87901661..9f49d9550e88 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c | |||
@@ -153,28 +153,28 @@ static int lm3530_init_registers(struct lm3530_data *drvdata) | |||
153 | u8 reg_val[LM3530_REG_MAX]; | 153 | u8 reg_val[LM3530_REG_MAX]; |
154 | u8 zones[LM3530_ALS_ZB_MAX]; | 154 | u8 zones[LM3530_ALS_ZB_MAX]; |
155 | u32 als_vmin, als_vmax, als_vstep; | 155 | u32 als_vmin, als_vmax, als_vstep; |
156 | struct lm3530_platform_data *pltfm = drvdata->pdata; | 156 | struct lm3530_platform_data *pdata = drvdata->pdata; |
157 | struct i2c_client *client = drvdata->client; | 157 | struct i2c_client *client = drvdata->client; |
158 | struct lm3530_pwm_data *pwm = &pltfm->pwm_data; | 158 | struct lm3530_pwm_data *pwm = &pdata->pwm_data; |
159 | 159 | ||
160 | gen_config = (pltfm->brt_ramp_law << LM3530_RAMP_LAW_SHIFT) | | 160 | gen_config = (pdata->brt_ramp_law << LM3530_RAMP_LAW_SHIFT) | |
161 | ((pltfm->max_current & 7) << LM3530_MAX_CURR_SHIFT); | 161 | ((pdata->max_current & 7) << LM3530_MAX_CURR_SHIFT); |
162 | 162 | ||
163 | if (drvdata->mode == LM3530_BL_MODE_MANUAL || | 163 | if (drvdata->mode == LM3530_BL_MODE_MANUAL || |
164 | drvdata->mode == LM3530_BL_MODE_ALS) | 164 | drvdata->mode == LM3530_BL_MODE_ALS) |
165 | gen_config |= (LM3530_ENABLE_I2C); | 165 | gen_config |= (LM3530_ENABLE_I2C); |
166 | 166 | ||
167 | if (drvdata->mode == LM3530_BL_MODE_ALS) { | 167 | if (drvdata->mode == LM3530_BL_MODE_ALS) { |
168 | if (pltfm->als_vmax == 0) { | 168 | if (pdata->als_vmax == 0) { |
169 | pltfm->als_vmin = 0; | 169 | pdata->als_vmin = 0; |
170 | pltfm->als_vmax = LM3530_ALS_WINDOW_mV; | 170 | pdata->als_vmax = LM3530_ALS_WINDOW_mV; |
171 | } | 171 | } |
172 | 172 | ||
173 | als_vmin = pltfm->als_vmin; | 173 | als_vmin = pdata->als_vmin; |
174 | als_vmax = pltfm->als_vmax; | 174 | als_vmax = pdata->als_vmax; |
175 | 175 | ||
176 | if ((als_vmax - als_vmin) > LM3530_ALS_WINDOW_mV) | 176 | if ((als_vmax - als_vmin) > LM3530_ALS_WINDOW_mV) |
177 | pltfm->als_vmax = als_vmax = | 177 | pdata->als_vmax = als_vmax = |
178 | als_vmin + LM3530_ALS_WINDOW_mV; | 178 | als_vmin + LM3530_ALS_WINDOW_mV; |
179 | 179 | ||
180 | /* n zone boundary makes n+1 zones */ | 180 | /* n zone boundary makes n+1 zones */ |
@@ -186,28 +186,28 @@ static int lm3530_init_registers(struct lm3530_data *drvdata) | |||
186 | / 1000; | 186 | / 1000; |
187 | 187 | ||
188 | als_config = | 188 | als_config = |
189 | (pltfm->als_avrg_time << LM3530_ALS_AVG_TIME_SHIFT) | | 189 | (pdata->als_avrg_time << LM3530_ALS_AVG_TIME_SHIFT) | |
190 | (LM3530_ENABLE_ALS) | | 190 | (LM3530_ENABLE_ALS) | |
191 | (pltfm->als_input_mode << LM3530_ALS_SEL_SHIFT); | 191 | (pdata->als_input_mode << LM3530_ALS_SEL_SHIFT); |
192 | 192 | ||
193 | als_imp_sel = | 193 | als_imp_sel = |
194 | (pltfm->als1_resistor_sel << LM3530_ALS1_IMP_SHIFT) | | 194 | (pdata->als1_resistor_sel << LM3530_ALS1_IMP_SHIFT) | |
195 | (pltfm->als2_resistor_sel << LM3530_ALS2_IMP_SHIFT); | 195 | (pdata->als2_resistor_sel << LM3530_ALS2_IMP_SHIFT); |
196 | 196 | ||
197 | } | 197 | } |
198 | 198 | ||
199 | if (drvdata->mode == LM3530_BL_MODE_PWM) | 199 | if (drvdata->mode == LM3530_BL_MODE_PWM) |
200 | gen_config |= (LM3530_ENABLE_PWM) | | 200 | gen_config |= (LM3530_ENABLE_PWM) | |
201 | (pltfm->pwm_pol_hi << LM3530_PWM_POL_SHIFT) | | 201 | (pdata->pwm_pol_hi << LM3530_PWM_POL_SHIFT) | |
202 | (LM3530_ENABLE_PWM_SIMPLE); | 202 | (LM3530_ENABLE_PWM_SIMPLE); |
203 | 203 | ||
204 | brt_ramp = (pltfm->brt_ramp_fall << LM3530_BRT_RAMP_FALL_SHIFT) | | 204 | brt_ramp = (pdata->brt_ramp_fall << LM3530_BRT_RAMP_FALL_SHIFT) | |
205 | (pltfm->brt_ramp_rise << LM3530_BRT_RAMP_RISE_SHIFT); | 205 | (pdata->brt_ramp_rise << LM3530_BRT_RAMP_RISE_SHIFT); |
206 | 206 | ||
207 | if (drvdata->brightness) | 207 | if (drvdata->brightness) |
208 | brightness = drvdata->brightness; | 208 | brightness = drvdata->brightness; |
209 | else | 209 | else |
210 | brightness = drvdata->brightness = pltfm->brt_val; | 210 | brightness = drvdata->brightness = pdata->brt_val; |
211 | 211 | ||
212 | if (brightness > drvdata->led_dev.max_brightness) | 212 | if (brightness > drvdata->led_dev.max_brightness) |
213 | brightness = drvdata->led_dev.max_brightness; | 213 | brightness = drvdata->led_dev.max_brightness; |