Staging: iio: light: tsl2x7x_core: use dev_get_platdata()
authorNizam Haider <nizamhaider786@gmail.com>
Mon, 23 Nov 2015 17:48:50 +0000 (23:18 +0530)
committerJonathan Cameron <jic23@kernel.org>
Wed, 2 Dec 2015 18:42:06 +0000 (18:42 +0000)
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Nizam Haider <nijamh@cdac.in>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2x7x_core.c

index 9dfd04855a1b0edb769866686ce505e30339a324..5b1c1650a0e4aa646834adc8808a2d405c33f0ed 100644 (file)
@@ -1898,7 +1898,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
        mutex_init(&chip->prox_mutex);
 
        chip->tsl2x7x_chip_status = TSL2X7X_CHIP_UNKNOWN;
-       chip->pdata = clientp->dev.platform_data;
+       chip->pdata = dev_get_platdata(&clientp->dev);
        chip->id = id->driver_data;
        chip->chip_info =
                &tsl2x7x_chip_info_tbl[device_channel_config[id->driver_data]];