pwm: Make pwmchip_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 7 Jul 2021 16:28:35 +0000 (18:28 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 2 Sep 2021 19:38:56 +0000 (21:38 +0200)
Since some time pwmchip_remove() always returns 0 so the return value
isn't usefull. Now that all callers are converted to ignore its value
the function can be changed to return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/core.c
include/linux/pwm.h

index 35e894f..4527f09 100644 (file)
@@ -304,7 +304,7 @@ EXPORT_SYMBOL_GPL(pwmchip_add);
  *
  * Returns: 0 on success or a negative error code on failure.
  */
-int pwmchip_remove(struct pwm_chip *chip)
+void pwmchip_remove(struct pwm_chip *chip)
 {
        pwmchip_sysfs_unexport(chip);
 
@@ -318,8 +318,6 @@ int pwmchip_remove(struct pwm_chip *chip)
        free_pwms(chip);
 
        mutex_unlock(&pwm_lock);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(pwmchip_remove);
 
index a0b7e43..725c9b7 100644 (file)
@@ -404,7 +404,7 @@ int pwm_set_chip_data(struct pwm_device *pwm, void *data);
 void *pwm_get_chip_data(struct pwm_device *pwm);
 
 int pwmchip_add(struct pwm_chip *chip);
-int pwmchip_remove(struct pwm_chip *chip);
+void pwmchip_remove(struct pwm_chip *chip);
 
 int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip);