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: position: hid-sensor-custom-intel-hinge: 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>
Link: https://patch.msgid.link/20240902222824.1145571-22-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Andy Shevchenko and committed by
Jonathan Cameron
cc10cbd6 a6cf377a

+2 -2
+2 -2
drivers/iio/position/hid-sensor-custom-intel-hinge.c
··· 263 263 /* Function to initialize the processing for usage id */ 264 264 static int hid_hinge_probe(struct platform_device *pdev) 265 265 { 266 + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); 266 267 struct hinge_state *st; 267 268 struct iio_dev *indio_dev; 268 - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 269 269 int ret; 270 270 int i; 271 271 ··· 344 344 /* Function to deinitialize the processing for usage id */ 345 345 static void hid_hinge_remove(struct platform_device *pdev) 346 346 { 347 - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 347 + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); 348 348 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 349 349 struct hinge_state *st = iio_priv(indio_dev); 350 350