diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-12-05 22:21:10 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-12-06 05:06:29 -0500 |
commit | c838cb3d477f79738ee03ede53a3f724021f3ae0 (patch) | |
tree | 5418f571570d6b2bb47a34bc41d31949caa603a1 /drivers/input/keyboard/adp5588-keys.c | |
parent | 54f05e95132bdb47fa408308d64fd293d3ffb908 (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/adp5588-keys.c')
-rw-r--r-- | drivers/input/keyboard/adp5588-keys.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index dbd2047f1641..e3874d3410b4 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c | |||
@@ -173,7 +173,7 @@ static int adp5588_build_gpiomap(struct adp5588_kpad *kpad, | |||
173 | static int adp5588_gpio_add(struct adp5588_kpad *kpad) | 173 | static int adp5588_gpio_add(struct adp5588_kpad *kpad) |
174 | { | 174 | { |
175 | struct device *dev = &kpad->client->dev; | 175 | struct device *dev = &kpad->client->dev; |
176 | const struct adp5588_kpad_platform_data *pdata = dev->platform_data; | 176 | const struct adp5588_kpad_platform_data *pdata = dev_get_platdata(dev); |
177 | const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data; | 177 | const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data; |
178 | int i, error; | 178 | int i, error; |
179 | 179 | ||
@@ -227,7 +227,7 @@ static int adp5588_gpio_add(struct adp5588_kpad *kpad) | |||
227 | static void adp5588_gpio_remove(struct adp5588_kpad *kpad) | 227 | static void adp5588_gpio_remove(struct adp5588_kpad *kpad) |
228 | { | 228 | { |
229 | struct device *dev = &kpad->client->dev; | 229 | struct device *dev = &kpad->client->dev; |
230 | const struct adp5588_kpad_platform_data *pdata = dev->platform_data; | 230 | const struct adp5588_kpad_platform_data *pdata = dev_get_platdata(dev); |
231 | const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data; | 231 | const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data; |
232 | int error; | 232 | int error; |
233 | 233 | ||
@@ -321,7 +321,8 @@ static irqreturn_t adp5588_irq(int irq, void *handle) | |||
321 | 321 | ||
322 | static int adp5588_setup(struct i2c_client *client) | 322 | static int adp5588_setup(struct i2c_client *client) |
323 | { | 323 | { |
324 | const struct adp5588_kpad_platform_data *pdata = client->dev.platform_data; | 324 | const struct adp5588_kpad_platform_data *pdata = |
325 | dev_get_platdata(&client->dev); | ||
325 | const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data; | 326 | const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data; |
326 | int i, ret; | 327 | int i, ret; |
327 | unsigned char evt_mode1 = 0, evt_mode2 = 0, evt_mode3 = 0; | 328 | unsigned char evt_mode1 = 0, evt_mode2 = 0, evt_mode3 = 0; |
@@ -424,7 +425,8 @@ static int adp5588_probe(struct i2c_client *client, | |||
424 | const struct i2c_device_id *id) | 425 | const struct i2c_device_id *id) |
425 | { | 426 | { |
426 | struct adp5588_kpad *kpad; | 427 | struct adp5588_kpad *kpad; |
427 | const struct adp5588_kpad_platform_data *pdata = client->dev.platform_data; | 428 | const struct adp5588_kpad_platform_data *pdata = |
429 | dev_get_platdata(&client->dev); | ||
428 | struct input_dev *input; | 430 | struct input_dev *input; |
429 | unsigned int revid; | 431 | unsigned int revid; |
430 | int ret, i; | 432 | int ret, i; |