Merge tag 'v4.10-rc5' into next
[sfrench/cifs-2.6.git] / drivers / input / misc / tps65218-pwrbutton.c
index cc74a41bdb0d24d7e5eddd0f1e019ab01cea71c4..a4455bb12ae0c1896a08aaa9bd198b2aafed19d9 100644 (file)
@@ -95,7 +95,7 @@ static int tps6521x_pb_probe(struct platform_device *pdev)
        int error;
        int irq;
 
-       match = of_match_node(of_tps6521x_pb_match, pdev->dev.of_node);
+       match = of_match_node(of_tps6521x_pb_match, dev->of_node);
        if (!match)
                return -ENXIO;
 
@@ -118,10 +118,9 @@ static int tps6521x_pb_probe(struct platform_device *pdev)
 
        input_set_capability(idev, EV_KEY, KEY_POWER);
 
-       pwr->regmap = dev_get_regmap(pdev->dev.parent, NULL);
+       pwr->regmap = dev_get_regmap(dev->parent, NULL);
        pwr->dev = dev;
        pwr->idev = idev;
-       platform_set_drvdata(pdev, pwr);
        device_init_wakeup(dev, true);
 
        irq = platform_get_irq(pdev, 0);
@@ -136,8 +135,7 @@ static int tps6521x_pb_probe(struct platform_device *pdev)
                                                IRQF_ONESHOT,
                                          pwr->data->name, pwr);
        if (error) {
-               dev_err(dev, "failed to request IRQ #%d: %d\n",
-                       irq, error);
+               dev_err(dev, "failed to request IRQ #%d: %d\n", irq, error);
                return error;
        }