Skip to content

Commit 4867424

Browse files
author
Uwe Kleine-König
committed
drm/bridge: ti-sn65dsi86: Make use of pwmchip_parent() accessor
struct pwm_chip::dev is about to change. To not have to touch this driver in the same commit as struct pwm_chip::dev, use the accessor function provided for exactly this purpose. Acked-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/10a8d55110fc48a4759e65cc19556858587e94cc.1707900770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 7ae57b1 commit 4867424

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
14151415
int ret;
14161416

14171417
if (!pdata->pwm_enabled) {
1418-
ret = pm_runtime_resume_and_get(chip->dev);
1418+
ret = pm_runtime_resume_and_get(pwmchip_parent(chip));
14191419
if (ret < 0)
14201420
return ret;
14211421
}
@@ -1431,7 +1431,7 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
14311431
SN_GPIO_MUX_MASK << (2 * SN_PWM_GPIO_IDX),
14321432
SN_GPIO_MUX_SPECIAL << (2 * SN_PWM_GPIO_IDX));
14331433
if (ret) {
1434-
dev_err(chip->dev, "failed to mux in PWM function\n");
1434+
dev_err(pwmchip_parent(chip), "failed to mux in PWM function\n");
14351435
goto out;
14361436
}
14371437
}
@@ -1507,7 +1507,7 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
15071507

15081508
ret = regmap_write(pdata->regmap, SN_PWM_PRE_DIV_REG, pre_div);
15091509
if (ret) {
1510-
dev_err(chip->dev, "failed to update PWM_PRE_DIV\n");
1510+
dev_err(pwmchip_parent(chip), "failed to update PWM_PRE_DIV\n");
15111511
goto out;
15121512
}
15131513

@@ -1519,15 +1519,15 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
15191519
FIELD_PREP(SN_PWM_INV_MASK, state->polarity == PWM_POLARITY_INVERSED);
15201520
ret = regmap_write(pdata->regmap, SN_PWM_EN_INV_REG, pwm_en_inv);
15211521
if (ret) {
1522-
dev_err(chip->dev, "failed to update PWM_EN/PWM_INV\n");
1522+
dev_err(pwmchip_parent(chip), "failed to update PWM_EN/PWM_INV\n");
15231523
goto out;
15241524
}
15251525

15261526
pdata->pwm_enabled = state->enabled;
15271527
out:
15281528

15291529
if (!pdata->pwm_enabled)
1530-
pm_runtime_put_sync(chip->dev);
1530+
pm_runtime_put_sync(pwmchip_parent(chip));
15311531

15321532
return ret;
15331533
}

0 commit comments

Comments
 (0)