diff options
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 2338119a09d8..b43b24bd3c9f 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -51,6 +51,8 @@ static int alloc_pwms(unsigned int count) if (start + count > MAX_PWMS) return -ENOSPC; + bitmap_set(allocated_pwms, start, count); + return start; } @@ -297,8 +299,6 @@ int pwmchip_add(struct pwm_chip *chip) radix_tree_insert(&pwm_tree, pwm->pwm, pwm); } - bitmap_set(allocated_pwms, chip->base, chip->npwm); - INIT_LIST_HEAD(&chip->list); list_add(&chip->list, &pwm_chips); |