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

Configure Feed

Select the types of activity you want to include in your feed.

iio: light: tsl2563: 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>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Andy Shevchenko and committed by
Jonathan Cameron
85a6b728 1f5e408f

+3 -3
+3 -3
drivers/iio/light/tsl2563.c
··· 701 701 u8 id = 0; 702 702 int err; 703 703 704 - indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip)); 704 + indio_dev = devm_iio_device_alloc(dev, sizeof(*chip)); 705 705 if (!indio_dev) 706 706 return -ENOMEM; 707 707 ··· 731 731 chip->cover_comp_gain = 1; 732 732 device_property_read_u32(dev, "amstaos,cover-comp-gain", &chip->cover_comp_gain); 733 733 734 - dev_info(&client->dev, "model %d, rev. %d\n", id >> 4, id & 0x0f); 734 + dev_info(dev, "model %d, rev. %d\n", id >> 4, id & 0x0f); 735 735 indio_dev->name = client->name; 736 736 indio_dev->channels = tsl2563_channels; 737 737 indio_dev->num_channels = ARRAY_SIZE(tsl2563_channels); ··· 748 748 irq_flags = IRQF_TRIGGER_RISING; 749 749 irq_flags |= IRQF_ONESHOT; 750 750 751 - err = devm_request_threaded_irq(&client->dev, client->irq, 751 + err = devm_request_threaded_irq(dev, client->irq, 752 752 NULL, 753 753 &tsl2563_event_handler, 754 754 irq_flags,