From c838cb3d477f79738ee03ede53a3f724021f3ae0 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Thu, 5 Dec 2013 19:21:10 -0800 Subject: Input: use dev_get_platdata() Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: Jingoo Han Acked-by: Fugang Duan Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/adp5589-keys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/input/keyboard/adp5589-keys.c') diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c index 67d12b3427c9..e43efa03f3e7 100644 --- a/drivers/input/keyboard/adp5589-keys.c +++ b/drivers/input/keyboard/adp5589-keys.c @@ -499,7 +499,7 @@ static int adp5589_build_gpiomap(struct adp5589_kpad *kpad, static int adp5589_gpio_add(struct adp5589_kpad *kpad) { struct device *dev = &kpad->client->dev; - const struct adp5589_kpad_platform_data *pdata = dev->platform_data; + const struct adp5589_kpad_platform_data *pdata = dev_get_platdata(dev); const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data; int i, error; @@ -553,7 +553,7 @@ static int adp5589_gpio_add(struct adp5589_kpad *kpad) static void adp5589_gpio_remove(struct adp5589_kpad *kpad) { struct device *dev = &kpad->client->dev; - const struct adp5589_kpad_platform_data *pdata = dev->platform_data; + const struct adp5589_kpad_platform_data *pdata = dev_get_platdata(dev); const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data; int error; @@ -658,7 +658,7 @@ static int adp5589_setup(struct adp5589_kpad *kpad) { struct i2c_client *client = kpad->client; const struct adp5589_kpad_platform_data *pdata = - client->dev.platform_data; + dev_get_platdata(&client->dev); u8 (*reg) (u8) = kpad->var->reg; unsigned char evt_mode1 = 0, evt_mode2 = 0, evt_mode3 = 0; unsigned char pull_mask = 0; @@ -864,7 +864,7 @@ static int adp5589_probe(struct i2c_client *client, { struct adp5589_kpad *kpad; const struct adp5589_kpad_platform_data *pdata = - client->dev.platform_data; + dev_get_platdata(&client->dev); struct input_dev *input; unsigned int revid; int ret, i; -- cgit v1.2.3