Input: joysticks - use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Mon, 5 Aug 2013 16:13:27 +0000 (09:13 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 13 Aug 2013 05:32:30 +0000 (22:32 -0700)
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>
drivers/input/joystick/as5011.c
drivers/input/joystick/maplecontrol.c

index 121cd63d3334b7a89b6a928fe62c8227b6f07231..13eba2a8c4e053f98e6e6816e98ad01ed1aa4837 100644 (file)
@@ -234,7 +234,7 @@ static int as5011_probe(struct i2c_client *client,
        int irq;
        int error;
 
-       plat_data = client->dev.platform_data;
+       plat_data = dev_get_platdata(&client->dev);
        if (!plat_data)
                return -EINVAL;
 
index 59c10ec5a2a13310ef667c96d9cb8675f739368c..8aa6e4c497da77c70df1827934b696c2bc4c0159 100644 (file)
@@ -61,7 +61,7 @@ static void dc_pad_callback(struct mapleq *mq)
 
 static int dc_pad_open(struct input_dev *dev)
 {
-       struct dc_pad *pad = dev->dev.platform_data;
+       struct dc_pad *pad = dev_get_platdata(&dev->dev);
 
        maple_getcond_callback(pad->mdev, dc_pad_callback, HZ/20,
                MAPLE_FUNC_CONTROLLER);
@@ -71,7 +71,7 @@ static int dc_pad_open(struct input_dev *dev)
 
 static void dc_pad_close(struct input_dev *dev)
 {
-       struct dc_pad *pad = dev->dev.platform_data;
+       struct dc_pad *pad = dev_get_platdata(&dev->dev);
 
        maple_getcond_callback(pad->mdev, dc_pad_callback, 0,
                MAPLE_FUNC_CONTROLLER);