@@ -1415,7 +1415,7 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
1415
1415
int ret ;
1416
1416
1417
1417
if (!pdata -> pwm_enabled ) {
1418
- ret = pm_runtime_resume_and_get (chip -> dev );
1418
+ ret = pm_runtime_resume_and_get (pwmchip_parent ( chip ) );
1419
1419
if (ret < 0 )
1420
1420
return ret ;
1421
1421
}
@@ -1431,7 +1431,7 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
1431
1431
SN_GPIO_MUX_MASK << (2 * SN_PWM_GPIO_IDX ),
1432
1432
SN_GPIO_MUX_SPECIAL << (2 * SN_PWM_GPIO_IDX ));
1433
1433
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" );
1435
1435
goto out ;
1436
1436
}
1437
1437
}
@@ -1507,7 +1507,7 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
1507
1507
1508
1508
ret = regmap_write (pdata -> regmap , SN_PWM_PRE_DIV_REG , pre_div );
1509
1509
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" );
1511
1511
goto out ;
1512
1512
}
1513
1513
@@ -1519,15 +1519,15 @@ static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
1519
1519
FIELD_PREP (SN_PWM_INV_MASK , state -> polarity == PWM_POLARITY_INVERSED );
1520
1520
ret = regmap_write (pdata -> regmap , SN_PWM_EN_INV_REG , pwm_en_inv );
1521
1521
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" );
1523
1523
goto out ;
1524
1524
}
1525
1525
1526
1526
pdata -> pwm_enabled = state -> enabled ;
1527
1527
out :
1528
1528
1529
1529
if (!pdata -> pwm_enabled )
1530
- pm_runtime_put_sync (chip -> dev );
1530
+ pm_runtime_put_sync (pwmchip_parent ( chip ) );
1531
1531
1532
1532
return ret ;
1533
1533
}
0 commit comments