Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jingoo Han and committed by
Dmitry Torokhov
846fc20f 7f26282f

+3 -3
+1 -1
drivers/input/joystick/as5011.c
··· 234 234 int irq; 235 235 int error; 236 236 237 - plat_data = client->dev.platform_data; 237 + plat_data = dev_get_platdata(&client->dev); 238 238 if (!plat_data) 239 239 return -EINVAL; 240 240
+2 -2
drivers/input/joystick/maplecontrol.c
··· 61 61 62 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 66 maple_getcond_callback(pad->mdev, dc_pad_callback, HZ/20, 67 67 MAPLE_FUNC_CONTROLLER); ··· 71 71 72 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 76 maple_getcond_callback(pad->mdev, dc_pad_callback, 0, 77 77 MAPLE_FUNC_CONTROLLER);