Merge tag 'io_uring-5.15-2021-09-11' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / drivers / pwm / pwm-hibvt.c
index 82d17fc..333f1b1 100644 (file)
@@ -206,8 +206,6 @@ static int hibvt_pwm_probe(struct platform_device *pdev)
        pwm_chip->chip.ops = &hibvt_pwm_ops;
        pwm_chip->chip.dev = &pdev->dev;
        pwm_chip->chip.npwm = soc->num_pwms;
-       pwm_chip->chip.of_xlate = of_pwm_xlate_with_flags;
-       pwm_chip->chip.of_pwm_n_cells = 3;
        pwm_chip->soc = soc;
 
        pwm_chip->base = devm_platform_ioremap_resource(pdev, 0);
@@ -250,13 +248,15 @@ static int hibvt_pwm_remove(struct platform_device *pdev)
 
        pwm_chip = platform_get_drvdata(pdev);
 
+       pwmchip_remove(&pwm_chip->chip);
+
        reset_control_assert(pwm_chip->rstc);
        msleep(30);
        reset_control_deassert(pwm_chip->rstc);
 
        clk_disable_unprepare(pwm_chip->clk);
 
-       return pwmchip_remove(&pwm_chip->chip);
+       return 0;
 }
 
 static const struct of_device_id hibvt_pwm_of_match[] = {