@@ -127,28 +127,28 @@ static int pwm_device_request(struct pwm_device *pwm, const char *label)
127
127
}
128
128
129
129
struct pwm_device *
130
- of_pwm_xlate_with_flags (struct pwm_chip * pc , const struct of_phandle_args * args )
130
+ of_pwm_xlate_with_flags (struct pwm_chip * chip , const struct of_phandle_args * args )
131
131
{
132
132
struct pwm_device * pwm ;
133
133
134
- if (pc -> of_pwm_n_cells < 2 )
134
+ if (chip -> of_pwm_n_cells < 2 )
135
135
return ERR_PTR (- EINVAL );
136
136
137
137
/* flags in the third cell are optional */
138
138
if (args -> args_count < 2 )
139
139
return ERR_PTR (- EINVAL );
140
140
141
- if (args -> args [0 ] >= pc -> npwm )
141
+ if (args -> args [0 ] >= chip -> npwm )
142
142
return ERR_PTR (- EINVAL );
143
143
144
- pwm = pwm_request_from_chip (pc , args -> args [0 ], NULL );
144
+ pwm = pwm_request_from_chip (chip , args -> args [0 ], NULL );
145
145
if (IS_ERR (pwm ))
146
146
return pwm ;
147
147
148
148
pwm -> args .period = args -> args [1 ];
149
149
pwm -> args .polarity = PWM_POLARITY_NORMAL ;
150
150
151
- if (pc -> of_pwm_n_cells >= 3 ) {
151
+ if (chip -> of_pwm_n_cells >= 3 ) {
152
152
if (args -> args_count > 2 && args -> args [2 ] & PWM_POLARITY_INVERTED )
153
153
pwm -> args .polarity = PWM_POLARITY_INVERSED ;
154
154
}
@@ -158,18 +158,18 @@ of_pwm_xlate_with_flags(struct pwm_chip *pc, const struct of_phandle_args *args)
158
158
EXPORT_SYMBOL_GPL (of_pwm_xlate_with_flags );
159
159
160
160
struct pwm_device *
161
- of_pwm_single_xlate (struct pwm_chip * pc , const struct of_phandle_args * args )
161
+ of_pwm_single_xlate (struct pwm_chip * chip , const struct of_phandle_args * args )
162
162
{
163
163
struct pwm_device * pwm ;
164
164
165
- if (pc -> of_pwm_n_cells < 1 )
165
+ if (chip -> of_pwm_n_cells < 1 )
166
166
return ERR_PTR (- EINVAL );
167
167
168
168
/* validate that one cell is specified, optionally with flags */
169
169
if (args -> args_count != 1 && args -> args_count != 2 )
170
170
return ERR_PTR (- EINVAL );
171
171
172
- pwm = pwm_request_from_chip (pc , 0 , NULL );
172
+ pwm = pwm_request_from_chip (chip , 0 , NULL );
173
173
if (IS_ERR (pwm ))
174
174
return pwm ;
175
175
@@ -692,7 +692,7 @@ static struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
692
692
struct pwm_device * pwm = NULL ;
693
693
struct of_phandle_args args ;
694
694
struct device_link * dl ;
695
- struct pwm_chip * pc ;
695
+ struct pwm_chip * chip ;
696
696
int index = 0 ;
697
697
int err ;
698
698
@@ -709,16 +709,16 @@ static struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
709
709
return ERR_PTR (err );
710
710
}
711
711
712
- pc = fwnode_to_pwmchip (of_fwnode_handle (args .np ));
713
- if (IS_ERR (pc )) {
714
- if (PTR_ERR (pc ) != - EPROBE_DEFER )
712
+ chip = fwnode_to_pwmchip (of_fwnode_handle (args .np ));
713
+ if (IS_ERR (chip )) {
714
+ if (PTR_ERR (chip ) != - EPROBE_DEFER )
715
715
pr_err ("%s(): PWM chip not found\n" , __func__ );
716
716
717
- pwm = ERR_CAST (pc );
717
+ pwm = ERR_CAST (chip );
718
718
goto put ;
719
719
}
720
720
721
- pwm = pc -> of_xlate (pc , & args );
721
+ pwm = chip -> of_xlate (chip , & args );
722
722
if (IS_ERR (pwm ))
723
723
goto put ;
724
724
0 commit comments