From a8b3a3a53f9a814e9938ea9cc179086ff5c0a387 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Tue, 30 Jul 2013 17:13:06 +0900 Subject: hwmon: use dev_get_platdata() Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han Signed-off-by: Guenter Roeck --- drivers/hwmon/lm87.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/hwmon/lm87.c') diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c index 16e45d702152..333092ce2465 100644 --- a/drivers/hwmon/lm87.c +++ b/drivers/hwmon/lm87.c @@ -855,8 +855,8 @@ static void lm87_init_client(struct i2c_client *client) { struct lm87_data *data = i2c_get_clientdata(client); - if (client->dev.platform_data) { - data->channel = *(u8 *)client->dev.platform_data; + if (dev_get_platdata(&client->dev)) { + data->channel = *(u8 *)dev_get_platdata(&client->dev); lm87_write_value(client, LM87_REG_CHANNEL_MODE, data->channel); } else { -- cgit v1.2.3