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: lm3533-als: Get platform data via dev_get_platdata()

Access to platform data via dev_get_platdata() getter to make code cleaner.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20240902222824.1145571-18-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Andy Shevchenko and committed by
Jonathan Cameron
e2f4b306 d72be90a

+3 -3
+3 -3
drivers/iio/light/lm3533-als.c
··· 754 754 } 755 755 756 756 static int lm3533_als_setup(struct lm3533_als *als, 757 - struct lm3533_als_platform_data *pdata) 757 + const struct lm3533_als_platform_data *pdata) 758 758 { 759 759 int ret; 760 760 ··· 828 828 829 829 static int lm3533_als_probe(struct platform_device *pdev) 830 830 { 831 + const struct lm3533_als_platform_data *pdata; 831 832 struct lm3533 *lm3533; 832 - struct lm3533_als_platform_data *pdata; 833 833 struct lm3533_als *als; 834 834 struct iio_dev *indio_dev; 835 835 int ret; ··· 838 838 if (!lm3533) 839 839 return -EINVAL; 840 840 841 - pdata = pdev->dev.platform_data; 841 + pdata = dev_get_platdata(&pdev->dev); 842 842 if (!pdata) { 843 843 dev_err(&pdev->dev, "no platform data\n"); 844 844 return -EINVAL;