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

backlight: hx8357: Utilise temporary variable for struct device

We have a temporary variable to keep pointer to struct device.
Utilise it inside the ->probe() implementation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20240201144951.294215-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Andy Shevchenko and committed by
Lee Jones
7ebac13e 7244d89a

+3 -4
+3 -4
drivers/video/backlight/hx8357.c
··· 574 574 hx8357_init_fn init_fn; 575 575 int i, ret; 576 576 577 - lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); 577 + lcd = devm_kzalloc(dev, sizeof(*lcd), GFP_KERNEL); 578 578 if (!lcd) 579 579 return -ENOMEM; 580 580 ··· 604 604 gpiod_set_consumer_name(lcd->im_pins->desc[i], "im_pins"); 605 605 } 606 606 607 - lcdev = devm_lcd_device_register(&spi->dev, "mxsfb", &spi->dev, lcd, 608 - &hx8357_ops); 607 + lcdev = devm_lcd_device_register(dev, "mxsfb", dev, lcd, &hx8357_ops); 609 608 if (IS_ERR(lcdev)) { 610 609 ret = PTR_ERR(lcdev); 611 610 return ret; ··· 617 618 if (ret) 618 619 return dev_err_probe(dev, ret, "Couldn't initialize panel\n"); 619 620 620 - dev_info(&spi->dev, "Panel probed\n"); 621 + dev_info(dev, "Panel probed\n"); 621 622 622 623 return 0; 623 624 }