File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ MODULE_DEVICE_TABLE(of, vt8500_pwm_dt_ids);
232
232
233
233
static int vt8500_pwm_probe (struct platform_device * pdev )
234
234
{
235
+ struct pwm_chip * chip ;
235
236
struct vt8500_chip * vt8500 ;
236
237
struct device_node * np = pdev -> dev .of_node ;
237
238
int ret ;
@@ -243,9 +244,10 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
243
244
if (vt8500 == NULL )
244
245
return - ENOMEM ;
245
246
246
- vt8500 -> chip .dev = & pdev -> dev ;
247
- vt8500 -> chip .ops = & vt8500_pwm_ops ;
248
- vt8500 -> chip .npwm = VT8500_NR_PWMS ;
247
+ chip = & vt8500 -> chip ;
248
+ chip -> dev = & pdev -> dev ;
249
+ chip -> ops = & vt8500_pwm_ops ;
250
+ chip -> npwm = VT8500_NR_PWMS ;
249
251
250
252
vt8500 -> clk = devm_clk_get_prepared (& pdev -> dev , NULL );
251
253
if (IS_ERR (vt8500 -> clk ))
@@ -255,7 +257,7 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
255
257
if (IS_ERR (vt8500 -> base ))
256
258
return PTR_ERR (vt8500 -> base );
257
259
258
- ret = devm_pwmchip_add (& pdev -> dev , & vt8500 -> chip );
260
+ ret = devm_pwmchip_add (& pdev -> dev , chip );
259
261
if (ret < 0 )
260
262
return dev_err_probe (& pdev -> dev , ret , "failed to add PWM chip\n" );
261
263
You can’t perform that action at this time.
0 commit comments