Skip to content

Commit

Permalink
input: misc: pwm-beeper: Explicitly apply PWM config extracted from p…
Browse files Browse the repository at this point in the history
…wm_args

Call pwm_apply_args() just after requesting the PWM device so that the
polarity and period are initialized according to the information
provided in pwm_args.

This is an intermediate state, and pwm_apply_args() should be dropped as
soon as the atomic PWM infrastructure is in place and the driver makes
use of it.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Boris Brezillon authored and thierryreding committed May 17, 2016
1 parent de93170 commit cfae56f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/input/misc/pwm-beeper.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ static int pwm_beeper_probe(struct platform_device *pdev)
goto err_free;
}

/*
* FIXME: pwm_apply_args() should be removed when switching to
* the atomic PWM API.
*/
pwm_apply_args(beeper->pwm);

beeper->input = input_allocate_device();
if (!beeper->input) {
dev_err(&pdev->dev, "Failed to allocate input device\n");
Expand Down

0 comments on commit cfae56f

Please sign in to comment.