diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-12 08:18:10 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-12 08:18:10 +0200 |
| commit | 069a0f32c9ca75ec7f02146711ec1f5840a68cbf (patch) | |
| tree | 0ee4fe0bdd706333192b26a0c43dda1481862bae /drivers/gpio/gpio-mvebu.c | |
| parent | aca4e68acf3a08561f2a413322cbb232edad8764 (diff) | |
| parent | 32c1431eea4881a6b17bd7c639315010aeefa452 (diff) | |
| download | linux-069a0f32c9ca75ec7f02146711ec1f5840a68cbf.tar.gz linux-069a0f32c9ca75ec7f02146711ec1f5840a68cbf.tar.bz2 linux-069a0f32c9ca75ec7f02146711ec1f5840a68cbf.zip | |
Merge 4.12-rc5 into char-misc-next
We want the char/misc driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio/gpio-mvebu.c')
| -rw-r--r-- | drivers/gpio/gpio-mvebu.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 19a92efabbef..5104b6398139 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -747,7 +747,7 @@ static int mvebu_pwm_probe(struct platform_device *pdev, set = U32_MAX; else return -EINVAL; - writel_relaxed(0, mvebu_gpioreg_blink_counter_select(mvchip)); + writel_relaxed(set, mvebu_gpioreg_blink_counter_select(mvchip)); mvpwm = devm_kzalloc(dev, sizeof(struct mvebu_pwm), GFP_KERNEL); if (!mvpwm) @@ -768,6 +768,13 @@ static int mvebu_pwm_probe(struct platform_device *pdev, mvpwm->chip.dev = dev; mvpwm->chip.ops = &mvebu_pwm_ops; mvpwm->chip.npwm = mvchip->chip.ngpio; + /* + * There may already be some PWM allocated, so we can't force + * mvpwm->chip.base to a fixed point like mvchip->chip.base. + * So, we let pwmchip_add() do the numbering and take the next free + * region. + */ + mvpwm->chip.base = -1; spin_lock_init(&mvpwm->lock); |
