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: orientation: hid-sensor-incl-3d: 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-20-andy.shevchenko@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Andy Shevchenko and committed by
Jonathan Cameron
b1b2cda4 c2a12a1a

+2 -2
+2 -2
drivers/iio/orientation/hid-sensor-incl-3d.c
··· 299 299 /* Function to initialize the processing for usage id */ 300 300 static int hid_incl_3d_probe(struct platform_device *pdev) 301 301 { 302 + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); 302 303 int ret; 303 304 static char *name = "incli_3d"; 304 305 struct iio_dev *indio_dev; 305 306 struct incl_3d_state *incl_state; 306 - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 307 307 308 308 indio_dev = devm_iio_device_alloc(&pdev->dev, 309 309 sizeof(struct incl_3d_state)); ··· 385 385 /* Function to deinitialize the processing for usage id */ 386 386 static void hid_incl_3d_remove(struct platform_device *pdev) 387 387 { 388 - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 388 + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); 389 389 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 390 390 struct incl_3d_state *incl_state = iio_priv(indio_dev); 391 391