Skip to content

Commit

Permalink
pwm: Make pwmchip_remove() return void
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
Uwe Kleine-König authored and thierryreding committed Sep 2, 2021
1 parent 7587f8a commit 8083f58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions drivers/pwm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion include/linux/pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8083f58

Please sign in to comment.