Skip to contentSkip to conversation

staging: iio: ad5933: use dev_get_platdata()

PATCH In review Alison Schofield 2 participants 2 messages Mar 14, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: iio: ad5933: use dev_get_platdata()

Use dev_get_platdata() for retrieving the platform data instead of accessing dev->platform_data directly.

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +1 -1
index d1218d8..4285874 100644
@@ -699,7 +699,7 @@ static int ad5933_probe(struct i2c_client *client,
 				   const struct i2c_device_id *id)
 {
 	int ret, voltage_uv = 0;
-	struct ad5933_platform_data *pdata = client->dev.platform_data;
+	struct ad5933_platform_data *pdata = dev_get_platdata(&client->dev);
 	struct ad5933_state *st;
 	struct iio_dev *indio_dev;
 
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alison Schofield

Use dev_get_platdata() for retrieving the platform data instead of accessing dev->platform_data directly.

Quoted 26 lines
---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +1 -2
index d1218d8..4285874 100644
@@ -699,7 +699,7 @@ static int ad5933_probe(struct i2c_client *client,
                                   const struct i2c_device_id *id)
 {
        int ret, voltage_uv = 0;
-       struct ad5933_platform_data *pdata = client->dev.platform_data;
+       struct ad5933_platform_data *pdata = dev_get_platdata(&client->dev);
        struct ad5933_state *st;
        struct iio_dev *indio_dev;
 
--

2.1.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160314061338.GA6632%40d830.WORKGROUP.
For more options, visit https://groups.google.com/d/optout.