Input: pwm-beeper - remove calls to legacy pwm_request API
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 6 Jan 2017 17:48:20 +0000 (09:48 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 22 Jan 2017 08:23:16 +0000 (00:23 -0800)
There are no more users of pwm-beeper driver in mainline relying on
this legacy API, so let's remove it and simplify the driver code.

Acked-by: Thierry Reding <thierry.reding@gmail.com>
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/pwm-beeper.c

index 5f9655d49a65475f4e64a6ac85de5b34f33ee321..cb87e475bd23c35c020c2703846a1c29a7b951a5 100644 (file)
@@ -95,7 +95,6 @@ static void pwm_beeper_close(struct input_dev *input)
 
 static int pwm_beeper_probe(struct platform_device *pdev)
 {
-       unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev);
        struct pwm_beeper *beeper;
        int error;
 
@@ -104,11 +103,6 @@ static int pwm_beeper_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        beeper->pwm = pwm_get(&pdev->dev, NULL);
-       if (IS_ERR(beeper->pwm)) {
-               dev_dbg(&pdev->dev, "unable to request PWM, trying legacy API\n");
-               beeper->pwm = pwm_request(pwm_id, "pwm beeper");
-       }
-
        if (IS_ERR(beeper->pwm)) {
                error = PTR_ERR(beeper->pwm);
                dev_err(&pdev->dev, "Failed to request pwm device: %d\n", error);