aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/adp5589-keys.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-05 22:21:10 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-06 05:06:29 -0500
commitc838cb3d477f79738ee03ede53a3f724021f3ae0 (patch)
tree5418f571570d6b2bb47a34bc41d31949caa603a1 /drivers/input/keyboard/adp5589-keys.c
parent54f05e95132bdb47fa408308d64fd293d3ffb908 (diff)
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 <jg1.han@samsung.com> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/adp5589-keys.c')
-rw-r--r--drivers/input/keyboard/adp5589-keys.c8
1 files changed, 4 insertions, 4 deletions
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,
499static int adp5589_gpio_add(struct adp5589_kpad *kpad) 499static int adp5589_gpio_add(struct adp5589_kpad *kpad)
500{ 500{
501 struct device *dev = &kpad->client->dev; 501 struct device *dev = &kpad->client->dev;
502 const struct adp5589_kpad_platform_data *pdata = dev->platform_data; 502 const struct adp5589_kpad_platform_data *pdata = dev_get_platdata(dev);
503 const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data; 503 const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data;
504 int i, error; 504 int i, error;
505 505
@@ -553,7 +553,7 @@ static int adp5589_gpio_add(struct adp5589_kpad *kpad)
553static void adp5589_gpio_remove(struct adp5589_kpad *kpad) 553static void adp5589_gpio_remove(struct adp5589_kpad *kpad)
554{ 554{
555 struct device *dev = &kpad->client->dev; 555 struct device *dev = &kpad->client->dev;
556 const struct adp5589_kpad_platform_data *pdata = dev->platform_data; 556 const struct adp5589_kpad_platform_data *pdata = dev_get_platdata(dev);
557 const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data; 557 const struct adp5589_gpio_platform_data *gpio_data = pdata->gpio_data;
558 int error; 558 int error;
559 559
@@ -658,7 +658,7 @@ static int adp5589_setup(struct adp5589_kpad *kpad)
658{ 658{
659 struct i2c_client *client = kpad->client; 659 struct i2c_client *client = kpad->client;
660 const struct adp5589_kpad_platform_data *pdata = 660 const struct adp5589_kpad_platform_data *pdata =
661 client->dev.platform_data; 661 dev_get_platdata(&client->dev);
662 u8 (*reg) (u8) = kpad->var->reg; 662 u8 (*reg) (u8) = kpad->var->reg;
663 unsigned char evt_mode1 = 0, evt_mode2 = 0, evt_mode3 = 0; 663 unsigned char evt_mode1 = 0, evt_mode2 = 0, evt_mode3 = 0;
664 unsigned char pull_mask = 0; 664 unsigned char pull_mask = 0;
@@ -864,7 +864,7 @@ static int adp5589_probe(struct i2c_client *client,
864{ 864{
865 struct adp5589_kpad *kpad; 865 struct adp5589_kpad *kpad;
866 const struct adp5589_kpad_platform_data *pdata = 866 const struct adp5589_kpad_platform_data *pdata =
867 client->dev.platform_data; 867 dev_get_platdata(&client->dev);
868 struct input_dev *input; 868 struct input_dev *input;
869 unsigned int revid; 869 unsigned int revid;
870 int ret, i; 870 int ret, i;