Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: sch: Utilise temporary variable for struct device

We have a temporary variable to keep a pointer to struct device.
Utilise it where it makes sense.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

+5 -5
+5 -5
drivers/gpio/gpio-sch.c
··· 328 328 void __iomem *regs; 329 329 int ret; 330 330 331 - sch = devm_kzalloc(&pdev->dev, sizeof(*sch), GFP_KERNEL); 331 + sch = devm_kzalloc(dev, sizeof(*sch), GFP_KERNEL); 332 332 if (!sch) 333 333 return -ENOMEM; 334 334 ··· 344 344 345 345 spin_lock_init(&sch->lock); 346 346 sch->chip = sch_gpio_chip; 347 - sch->chip.label = dev_name(&pdev->dev); 348 - sch->chip.parent = &pdev->dev; 347 + sch->chip.label = dev_name(dev); 348 + sch->chip.parent = dev; 349 349 350 350 switch (pdev->id) { 351 351 case PCI_DEVICE_ID_INTEL_SCH_LPC: ··· 399 399 400 400 ret = sch_gpio_install_gpe_handler(sch); 401 401 if (ret) 402 - dev_warn(&pdev->dev, "Can't setup GPE, no IRQ support\n"); 402 + dev_warn(dev, "Can't setup GPE, no IRQ support\n"); 403 403 404 - return devm_gpiochip_add_data(&pdev->dev, &sch->chip, sch); 404 + return devm_gpiochip_add_data(dev, &sch->chip, sch); 405 405 } 406 406 407 407 static struct platform_driver sch_gpio_driver = {