Input: rotary_encoder - fix relative axis support
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Oct 2009 04:43:42 +0000 (21:43 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 6 Oct 2009 05:00:01 +0000 (22:00 -0700)
When the rotart_encoder driver is used to report relative axis
information the "steps" in the platform data could be missing
since it's not relevant.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/rotary_encoder.c

index c806fbf1e1741ae68a542bc402e8236776c01f7c..3b9f588fc74746e5bfb5179418e414d1e8a8921e 100644 (file)
@@ -106,8 +106,8 @@ static int __devinit rotary_encoder_probe(struct platform_device *pdev)
        struct input_dev *input;
        int err;
 
-       if (!pdata || !pdata->steps) {
-               dev_err(&pdev->dev, "invalid platform data\n");
+       if (!pdata) {
+               dev_err(&pdev->dev, "missing platform data\n");
                return -ENOENT;
        }