@@ -127,28 +127,28 @@ static int pwm_device_request(struct pwm_device *pwm, const char *label)
127127}
128128
129129struct 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 )
131131{
132132 struct pwm_device * pwm ;
133133
134- if (pc -> of_pwm_n_cells < 2 )
134+ if (chip -> of_pwm_n_cells < 2 )
135135 return ERR_PTR (- EINVAL );
136136
137137 /* flags in the third cell are optional */
138138 if (args -> args_count < 2 )
139139 return ERR_PTR (- EINVAL );
140140
141- if (args -> args [0 ] >= pc -> npwm )
141+ if (args -> args [0 ] >= chip -> npwm )
142142 return ERR_PTR (- EINVAL );
143143
144- pwm = pwm_request_from_chip (pc , args -> args [0 ], NULL );
144+ pwm = pwm_request_from_chip (chip , args -> args [0 ], NULL );
145145 if (IS_ERR (pwm ))
146146 return pwm ;
147147
148148 pwm -> args .period = args -> args [1 ];
149149 pwm -> args .polarity = PWM_POLARITY_NORMAL ;
150150
151- if (pc -> of_pwm_n_cells >= 3 ) {
151+ if (chip -> of_pwm_n_cells >= 3 ) {
152152 if (args -> args_count > 2 && args -> args [2 ] & PWM_POLARITY_INVERTED )
153153 pwm -> args .polarity = PWM_POLARITY_INVERSED ;
154154 }
@@ -158,18 +158,18 @@ of_pwm_xlate_with_flags(struct pwm_chip *pc, const struct of_phandle_args *args)
158158EXPORT_SYMBOL_GPL (of_pwm_xlate_with_flags );
159159
160160struct 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 )
162162{
163163 struct pwm_device * pwm ;
164164
165- if (pc -> of_pwm_n_cells < 1 )
165+ if (chip -> of_pwm_n_cells < 1 )
166166 return ERR_PTR (- EINVAL );
167167
168168 /* validate that one cell is specified, optionally with flags */
169169 if (args -> args_count != 1 && args -> args_count != 2 )
170170 return ERR_PTR (- EINVAL );
171171
172- pwm = pwm_request_from_chip (pc , 0 , NULL );
172+ pwm = pwm_request_from_chip (chip , 0 , NULL );
173173 if (IS_ERR (pwm ))
174174 return pwm ;
175175
@@ -692,7 +692,7 @@ static struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
692692 struct pwm_device * pwm = NULL ;
693693 struct of_phandle_args args ;
694694 struct device_link * dl ;
695- struct pwm_chip * pc ;
695+ struct pwm_chip * chip ;
696696 int index = 0 ;
697697 int err ;
698698
@@ -709,16 +709,16 @@ static struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
709709 return ERR_PTR (err );
710710 }
711711
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 )
715715 pr_err ("%s(): PWM chip not found\n" , __func__ );
716716
717- pwm = ERR_CAST (pc );
717+ pwm = ERR_CAST (chip );
718718 goto put ;
719719 }
720720
721- pwm = pc -> of_xlate (pc , & args );
721+ pwm = chip -> of_xlate (chip , & args );
722722 if (IS_ERR (pwm ))
723723 goto put ;
724724
0 commit comments