struct lp_gpio {
        struct gpio_chip        chip;
-       struct platform_device  *pdev;
+       struct device           *dev;
        raw_spinlock_t          lock;
        unsigned long           reg_base;
 };
        unsigned long acpi_use = lp_gpio_reg(chip, offset, LP_ACPI_OWNED);
        u32 value;
 
-       pm_runtime_get(&lg->pdev->dev); /* should we put if failed */
+       pm_runtime_get(lg->dev); /* should we put if failed */
 
        /* Fail if BIOS reserved pin for ACPI use */
        if (!(inl(acpi_use) & BIT(offset % 32))) {
-               dev_err(&lg->pdev->dev, "gpio %d reserved for ACPI\n", offset);
+               dev_err(lg->dev, "gpio %d reserved for ACPI\n", offset);
                return -EBUSY;
        }
 
        value = inl(reg);
        if ((value & USE_SEL_MASK) != USE_SEL_GPIO) {
                outl((value & USE_SEL_MASK) | USE_SEL_GPIO, reg);
-               dev_warn(&lg->pdev->dev, FW_BUG "pin %u forcibly reconfigured as GPIO\n", offset);
+               dev_warn(lg->dev, FW_BUG "pin %u forcibly reconfigured as GPIO\n", offset);
        }
 
        /* enable input sensing */
        /* disable input sensing */
        outl(inl(conf2) | GPINDIS_BIT, conf2);
 
-       pm_runtime_put(&lg->pdev->dev);
+       pm_runtime_put(lg->dev);
 }
 
 static int lp_irq_type(struct irq_data *d, unsigned type)
        if (!lg)
                return -ENOMEM;
 
-       lg->pdev = pdev;
+       lg->dev = dev;
        platform_set_drvdata(pdev, lg);
 
        io_rc = platform_get_resource(pdev, IORESOURCE_IO, 0);
                girq->init_hw = lp_gpio_irq_init_hw;
                girq->parent_handler = lp_gpio_irq_handler;
                girq->num_parents = 1;
-               girq->parents = devm_kcalloc(&pdev->dev, girq->num_parents,
+               girq->parents = devm_kcalloc(dev, girq->num_parents,
                                             sizeof(*girq->parents),
                                             GFP_KERNEL);
                if (!girq->parents)