diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-08-05 12:13:27 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-08-13 01:32:30 -0400 |
commit | 846fc20ff76ae10793c0f02b67f0308234fb7539 (patch) | |
tree | c5a1f3e0e76444df6ac95e18137ac5b4ffc84767 /drivers/input/joystick | |
parent | 7f26282f0511839059ca35c0594863575bf7ccf5 (diff) |
Input: joysticks - 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 <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/as5011.c | 2 | ||||
-rw-r--r-- | drivers/input/joystick/maplecontrol.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c index 121cd63d3334..13eba2a8c4e0 100644 --- a/drivers/input/joystick/as5011.c +++ b/drivers/input/joystick/as5011.c | |||
@@ -234,7 +234,7 @@ static int as5011_probe(struct i2c_client *client, | |||
234 | int irq; | 234 | int irq; |
235 | int error; | 235 | int error; |
236 | 236 | ||
237 | plat_data = client->dev.platform_data; | 237 | plat_data = dev_get_platdata(&client->dev); |
238 | if (!plat_data) | 238 | if (!plat_data) |
239 | return -EINVAL; | 239 | return -EINVAL; |
240 | 240 | ||
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c index 59c10ec5a2a1..8aa6e4c497da 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c | |||
@@ -61,7 +61,7 @@ static void dc_pad_callback(struct mapleq *mq) | |||
61 | 61 | ||
62 | static int dc_pad_open(struct input_dev *dev) | 62 | static int dc_pad_open(struct input_dev *dev) |
63 | { | 63 | { |
64 | struct dc_pad *pad = dev->dev.platform_data; | 64 | struct dc_pad *pad = dev_get_platdata(&dev->dev); |
65 | 65 | ||
66 | maple_getcond_callback(pad->mdev, dc_pad_callback, HZ/20, | 66 | maple_getcond_callback(pad->mdev, dc_pad_callback, HZ/20, |
67 | MAPLE_FUNC_CONTROLLER); | 67 | MAPLE_FUNC_CONTROLLER); |
@@ -71,7 +71,7 @@ static int dc_pad_open(struct input_dev *dev) | |||
71 | 71 | ||
72 | static void dc_pad_close(struct input_dev *dev) | 72 | static void dc_pad_close(struct input_dev *dev) |
73 | { | 73 | { |
74 | struct dc_pad *pad = dev->dev.platform_data; | 74 | struct dc_pad *pad = dev_get_platdata(&dev->dev); |
75 | 75 | ||
76 | maple_getcond_callback(pad->mdev, dc_pad_callback, 0, | 76 | maple_getcond_callback(pad->mdev, dc_pad_callback, 0, |
77 | MAPLE_FUNC_CONTROLLER); | 77 | MAPLE_FUNC_CONTROLLER); |