提交 4ff66efd 编写于 作者: B Boris BREZILLON 提交者: Thierry Reding

backlight: lm3630a_bl: Stop messing with the pwm->period field

pwm->period field is not supposed to be changed by PWM users. The only
ones authorized to change it are the PWM core and PWM drivers.
Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 7f044b09
...@@ -162,7 +162,7 @@ static int lm3630a_intr_config(struct lm3630a_chip *pchip) ...@@ -162,7 +162,7 @@ static int lm3630a_intr_config(struct lm3630a_chip *pchip)
static void lm3630a_pwm_ctrl(struct lm3630a_chip *pchip, int br, int br_max) static void lm3630a_pwm_ctrl(struct lm3630a_chip *pchip, int br, int br_max)
{ {
unsigned int period = pwm_get_period(pchip->pwmd); unsigned int period = pchip->pdata->pwm_period;
unsigned int duty = br * period / br_max; unsigned int duty = br * period / br_max;
pwm_config(pchip->pwmd, duty, period); pwm_config(pchip->pwmd, duty, period);
...@@ -425,7 +425,6 @@ static int lm3630a_probe(struct i2c_client *client, ...@@ -425,7 +425,6 @@ static int lm3630a_probe(struct i2c_client *client,
return PTR_ERR(pchip->pwmd); return PTR_ERR(pchip->pwmd);
} }
} }
pchip->pwmd->period = pdata->pwm_period;
/* interrupt enable : irq 0 is not allowed */ /* interrupt enable : irq 0 is not allowed */
pchip->irq = client->irq; pchip->irq = client->irq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册