Input: olpc_apsp - remove set but not used variable 'np'
authorYueHaibing <yuehaibing@huawei.com>
Mon, 3 Dec 2018 19:29:30 +0000 (11:29 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 3 Dec 2018 19:35:42 +0000 (11:35 -0800)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/input/serio/olpc_apsp.c: In function 'olpc_apsp_probe':
drivers/input/serio/olpc_apsp.c:192:22: warning:
 variable 'np' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit b56ece9a3ac3 ("Input: add OLPC
AP-SP driver")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/olpc_apsp.c

index 91d6fb8d7d8d1f5385cc9d67b888dc73e69f1ad5..b36084710f696626b3f9a595f22c357169a30fdf 100644 (file)
@@ -189,14 +189,12 @@ static int olpc_apsp_probe(struct platform_device *pdev)
        struct serio *kb_serio, *pad_serio;
        struct olpc_apsp *priv;
        struct resource *res;
-       struct device_node *np;
        int error;
 
        priv = devm_kzalloc(&pdev->dev, sizeof(struct olpc_apsp), GFP_KERNEL);
        if (!priv)
                return -ENOMEM;
 
-       np = pdev->dev.of_node;
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        priv->base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(priv->base)) {