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 | |
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')
51 files changed, 79 insertions, 67 deletions
diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c index ef26b17fb159..0dc1151d02fb 100644 --- a/drivers/input/keyboard/adp5520-keys.c +++ b/drivers/input/keyboard/adp5520-keys.c | |||
@@ -71,7 +71,7 @@ static int adp5520_keys_notifier(struct notifier_block *nb, | |||
71 | 71 | ||
72 | static int adp5520_keys_probe(struct platform_device *pdev) | 72 | static int adp5520_keys_probe(struct platform_device *pdev) |
73 | { | 73 | { |
74 | struct adp5520_keys_platform_data *pdata = pdev->dev.platform_data; | 74 | struct adp5520_keys_platform_data *pdata = dev_get_platdata(&pdev->dev); |
75 | struct input_dev *input; | 75 | struct input_dev *input; |
76 | struct adp5520_keys *dev; | 76 | struct adp5520_keys *dev; |
77 | int ret, i; | 77 | int ret, i; |
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; |
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, | |||
499 | static int adp5589_gpio_add(struct adp5589_kpad *kpad) | 499 | static 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) | |||
553 | static void adp5589_gpio_remove(struct adp5589_kpad *kpad) | 553 | static 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; |
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index fc88fb48d70d..16fa3400d86a 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c | |||
@@ -180,7 +180,7 @@ static irqreturn_t bfin_kpad_isr(int irq, void *dev_id) | |||
180 | static int bfin_kpad_probe(struct platform_device *pdev) | 180 | static int bfin_kpad_probe(struct platform_device *pdev) |
181 | { | 181 | { |
182 | struct bf54x_kpad *bf54x_kpad; | 182 | struct bf54x_kpad *bf54x_kpad; |
183 | struct bfin_kpad_platform_data *pdata = pdev->dev.platform_data; | 183 | struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev); |
184 | struct input_dev *input; | 184 | struct input_dev *input; |
185 | int i, error; | 185 | int i, error; |
186 | 186 | ||
@@ -332,7 +332,7 @@ out: | |||
332 | 332 | ||
333 | static int bfin_kpad_remove(struct platform_device *pdev) | 333 | static int bfin_kpad_remove(struct platform_device *pdev) |
334 | { | 334 | { |
335 | struct bfin_kpad_platform_data *pdata = pdev->dev.platform_data; | 335 | struct bfin_kpad_platform_data *pdata = dev_get_platdata(&pdev->dev); |
336 | struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); | 336 | struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); |
337 | 337 | ||
338 | del_timer_sync(&bf54x_kpad->timer); | 338 | del_timer_sync(&bf54x_kpad->timer); |
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index d15977a8361e..1559dc1cf951 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
@@ -172,7 +172,7 @@ static int __init davinci_ks_probe(struct platform_device *pdev) | |||
172 | struct input_dev *key_dev; | 172 | struct input_dev *key_dev; |
173 | struct resource *res, *mem; | 173 | struct resource *res, *mem; |
174 | struct device *dev = &pdev->dev; | 174 | struct device *dev = &pdev->dev; |
175 | struct davinci_ks_platform_data *pdata = pdev->dev.platform_data; | 175 | struct davinci_ks_platform_data *pdata = dev_get_platdata(&pdev->dev); |
176 | int error, i; | 176 | int error, i; |
177 | 177 | ||
178 | if (pdata->device_enable) { | 178 | if (pdata->device_enable) { |
diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index 47206bdba411..e59876212b8c 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c | |||
@@ -244,7 +244,7 @@ static int ep93xx_keypad_probe(struct platform_device *pdev) | |||
244 | if (!keypad) | 244 | if (!keypad) |
245 | return -ENOMEM; | 245 | return -ENOMEM; |
246 | 246 | ||
247 | keypad->pdata = pdev->dev.platform_data; | 247 | keypad->pdata = dev_get_platdata(&pdev->dev); |
248 | if (!keypad->pdata) { | 248 | if (!keypad->pdata) { |
249 | err = -EINVAL; | 249 | err = -EINVAL; |
250 | goto failed_free; | 250 | goto failed_free; |
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 328cfc1eed95..34bb35895268 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c | |||
@@ -425,7 +425,8 @@ MODULE_DEVICE_TABLE(of, imx_keypad_of_match); | |||
425 | 425 | ||
426 | static int imx_keypad_probe(struct platform_device *pdev) | 426 | static int imx_keypad_probe(struct platform_device *pdev) |
427 | { | 427 | { |
428 | const struct matrix_keymap_data *keymap_data = pdev->dev.platform_data; | 428 | const struct matrix_keymap_data *keymap_data = |
429 | dev_get_platdata(&pdev->dev); | ||
429 | struct imx_keypad *keypad; | 430 | struct imx_keypad *keypad; |
430 | struct input_dev *input_dev; | 431 | struct input_dev *input_dev; |
431 | struct resource *res; | 432 | struct resource *res; |
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index 0de23f41b2d3..0b42118cbf8f 100644 --- a/drivers/input/keyboard/lm8323.c +++ b/drivers/input/keyboard/lm8323.c | |||
@@ -627,7 +627,7 @@ static DEVICE_ATTR(disable_kp, 0644, lm8323_show_disable, lm8323_set_disable); | |||
627 | static int lm8323_probe(struct i2c_client *client, | 627 | static int lm8323_probe(struct i2c_client *client, |
628 | const struct i2c_device_id *id) | 628 | const struct i2c_device_id *id) |
629 | { | 629 | { |
630 | struct lm8323_platform_data *pdata = client->dev.platform_data; | 630 | struct lm8323_platform_data *pdata = dev_get_platdata(&client->dev); |
631 | struct input_dev *idev; | 631 | struct input_dev *idev; |
632 | struct lm8323_chip *lm; | 632 | struct lm8323_chip *lm; |
633 | int pwm; | 633 | int pwm; |
diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c index 5a8ca35dc9af..9081cbef11ea 100644 --- a/drivers/input/keyboard/lm8333.c +++ b/drivers/input/keyboard/lm8333.c | |||
@@ -131,7 +131,8 @@ static irqreturn_t lm8333_irq_thread(int irq, void *data) | |||
131 | static int lm8333_probe(struct i2c_client *client, | 131 | static int lm8333_probe(struct i2c_client *client, |
132 | const struct i2c_device_id *id) | 132 | const struct i2c_device_id *id) |
133 | { | 133 | { |
134 | const struct lm8333_platform_data *pdata = client->dev.platform_data; | 134 | const struct lm8333_platform_data *pdata = |
135 | dev_get_platdata(&client->dev); | ||
135 | struct lm8333 *lm8333; | 136 | struct lm8333 *lm8333; |
136 | struct input_dev *input; | 137 | struct input_dev *input; |
137 | int err, active_time; | 138 | int err, active_time; |
diff --git a/drivers/input/keyboard/max7359_keypad.c b/drivers/input/keyboard/max7359_keypad.c index bc2cdaf563fd..430b54539720 100644 --- a/drivers/input/keyboard/max7359_keypad.c +++ b/drivers/input/keyboard/max7359_keypad.c | |||
@@ -182,7 +182,8 @@ static void max7359_initialize(struct i2c_client *client) | |||
182 | static int max7359_probe(struct i2c_client *client, | 182 | static int max7359_probe(struct i2c_client *client, |
183 | const struct i2c_device_id *id) | 183 | const struct i2c_device_id *id) |
184 | { | 184 | { |
185 | const struct matrix_keymap_data *keymap_data = client->dev.platform_data; | 185 | const struct matrix_keymap_data *keymap_data = |
186 | dev_get_platdata(&client->dev); | ||
186 | struct max7359_keypad *keypad; | 187 | struct max7359_keypad *keypad; |
187 | struct input_dev *input_dev; | 188 | struct input_dev *input_dev; |
188 | int ret; | 189 | int ret; |
diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c index 7c236f9c6a51..5ec77523e040 100644 --- a/drivers/input/keyboard/mcs_touchkey.c +++ b/drivers/input/keyboard/mcs_touchkey.c | |||
@@ -108,7 +108,7 @@ static int mcs_touchkey_probe(struct i2c_client *client, | |||
108 | int error; | 108 | int error; |
109 | int i; | 109 | int i; |
110 | 110 | ||
111 | pdata = client->dev.platform_data; | 111 | pdata = dev_get_platdata(&client->dev); |
112 | if (!pdata) { | 112 | if (!pdata) { |
113 | dev_err(&client->dev, "no platform data defined\n"); | 113 | dev_err(&client->dev, "no platform data defined\n"); |
114 | return -EINVAL; | 114 | return -EINVAL; |
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c index f7f3e9a9fd3f..98b8467aa6c9 100644 --- a/drivers/input/keyboard/mpr121_touchkey.c +++ b/drivers/input/keyboard/mpr121_touchkey.c | |||
@@ -188,7 +188,8 @@ err_i2c_write: | |||
188 | static int mpr_touchkey_probe(struct i2c_client *client, | 188 | static int mpr_touchkey_probe(struct i2c_client *client, |
189 | const struct i2c_device_id *id) | 189 | const struct i2c_device_id *id) |
190 | { | 190 | { |
191 | const struct mpr121_platform_data *pdata = client->dev.platform_data; | 191 | const struct mpr121_platform_data *pdata = |
192 | dev_get_platdata(&client->dev); | ||
192 | struct mpr121_touchkey *mpr121; | 193 | struct mpr121_touchkey *mpr121; |
193 | struct input_dev *input_dev; | 194 | struct input_dev *input_dev; |
194 | int error; | 195 | int error; |
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index c7d505cce72f..63332e2f8628 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c | |||
@@ -222,7 +222,8 @@ static irqreturn_t ske_keypad_irq(int irq, void *dev_id) | |||
222 | 222 | ||
223 | static int __init ske_keypad_probe(struct platform_device *pdev) | 223 | static int __init ske_keypad_probe(struct platform_device *pdev) |
224 | { | 224 | { |
225 | const struct ske_keypad_platform_data *plat = pdev->dev.platform_data; | 225 | const struct ske_keypad_platform_data *plat = |
226 | dev_get_platdata(&pdev->dev); | ||
226 | struct ske_keypad *keypad; | 227 | struct ske_keypad *keypad; |
227 | struct input_dev *input; | 228 | struct input_dev *input; |
228 | struct resource *res; | 229 | struct resource *res; |
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index d0d5226d9cd4..e80bb9743356 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c | |||
@@ -248,7 +248,7 @@ static int omap_kp_probe(struct platform_device *pdev) | |||
248 | { | 248 | { |
249 | struct omap_kp *omap_kp; | 249 | struct omap_kp *omap_kp; |
250 | struct input_dev *input_dev; | 250 | struct input_dev *input_dev; |
251 | struct omap_kp_platform_data *pdata = pdev->dev.platform_data; | 251 | struct omap_kp_platform_data *pdata = dev_get_platdata(&pdev->dev); |
252 | int i, col_idx, row_idx, ret; | 252 | int i, col_idx, row_idx, ret; |
253 | unsigned int row_shift, keycodemax; | 253 | unsigned int row_shift, keycodemax; |
254 | 254 | ||
diff --git a/drivers/input/keyboard/pxa930_rotary.c b/drivers/input/keyboard/pxa930_rotary.c index 248cdcf95296..367b03ab92a2 100644 --- a/drivers/input/keyboard/pxa930_rotary.c +++ b/drivers/input/keyboard/pxa930_rotary.c | |||
@@ -84,7 +84,8 @@ static void pxa930_rotary_close(struct input_dev *dev) | |||
84 | 84 | ||
85 | static int pxa930_rotary_probe(struct platform_device *pdev) | 85 | static int pxa930_rotary_probe(struct platform_device *pdev) |
86 | { | 86 | { |
87 | struct pxa930_rotary_platform_data *pdata = pdev->dev.platform_data; | 87 | struct pxa930_rotary_platform_data *pdata = |
88 | dev_get_platdata(&pdev->dev); | ||
88 | struct pxa930_rotary *r; | 89 | struct pxa930_rotary *r; |
89 | struct input_dev *input_dev; | 90 | struct input_dev *input_dev; |
90 | struct resource *res; | 91 | struct resource *res; |
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index ac43a486c775..9ac8a1e0c08e 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c | |||
@@ -321,7 +321,7 @@ static int samsung_keypad_probe(struct platform_device *pdev) | |||
321 | if (pdev->dev.of_node) | 321 | if (pdev->dev.of_node) |
322 | pdata = samsung_keypad_parse_dt(&pdev->dev); | 322 | pdata = samsung_keypad_parse_dt(&pdev->dev); |
323 | else | 323 | else |
324 | pdata = pdev->dev.platform_data; | 324 | pdata = dev_get_platdata(&pdev->dev); |
325 | if (!pdata) { | 325 | if (!pdata) { |
326 | dev_err(&pdev->dev, "no platform data defined\n"); | 326 | dev_err(&pdev->dev, "no platform data defined\n"); |
327 | return -EINVAL; | 327 | return -EINVAL; |
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index fe0e498d2479..d65a98b1d7dd 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c | |||
@@ -171,7 +171,7 @@ static int sh_keysc_probe(struct platform_device *pdev) | |||
171 | int i; | 171 | int i; |
172 | int irq, error; | 172 | int irq, error; |
173 | 173 | ||
174 | if (!pdev->dev.platform_data) { | 174 | if (!dev_get_platdata(&pdev->dev)) { |
175 | dev_err(&pdev->dev, "no platform data defined\n"); | 175 | dev_err(&pdev->dev, "no platform data defined\n"); |
176 | error = -EINVAL; | 176 | error = -EINVAL; |
177 | goto err0; | 177 | goto err0; |
@@ -198,7 +198,7 @@ static int sh_keysc_probe(struct platform_device *pdev) | |||
198 | } | 198 | } |
199 | 199 | ||
200 | platform_set_drvdata(pdev, priv); | 200 | platform_set_drvdata(pdev, priv); |
201 | memcpy(&priv->pdata, pdev->dev.platform_data, sizeof(priv->pdata)); | 201 | memcpy(&priv->pdata, dev_get_platdata(&pdev->dev), sizeof(priv->pdata)); |
202 | pdata = &priv->pdata; | 202 | pdata = &priv->pdata; |
203 | 203 | ||
204 | priv->iomem_base = ioremap_nocache(res->start, resource_size(res)); | 204 | priv->iomem_base = ioremap_nocache(res->start, resource_size(res)); |
diff --git a/drivers/input/keyboard/tca6416-keypad.c b/drivers/input/keyboard/tca6416-keypad.c index bfc832c35a7c..dc983ab6c0ad 100644 --- a/drivers/input/keyboard/tca6416-keypad.c +++ b/drivers/input/keyboard/tca6416-keypad.c | |||
@@ -213,7 +213,7 @@ static int tca6416_keypad_probe(struct i2c_client *client, | |||
213 | return -ENODEV; | 213 | return -ENODEV; |
214 | } | 214 | } |
215 | 215 | ||
216 | pdata = client->dev.platform_data; | 216 | pdata = dev_get_platdata(&client->dev); |
217 | if (!pdata) { | 217 | if (!pdata) { |
218 | dev_dbg(&client->dev, "no platform data\n"); | 218 | dev_dbg(&client->dev, "no platform data\n"); |
219 | return -EINVAL; | 219 | return -EINVAL; |
diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c index 8bd24d52bf1b..086511c2121b 100644 --- a/drivers/input/keyboard/tnetv107x-keypad.c +++ b/drivers/input/keyboard/tnetv107x-keypad.c | |||
@@ -162,7 +162,7 @@ static int keypad_probe(struct platform_device *pdev) | |||
162 | int error = 0, sz, row_shift; | 162 | int error = 0, sz, row_shift; |
163 | u32 rev = 0; | 163 | u32 rev = 0; |
164 | 164 | ||
165 | pdata = pdev->dev.platform_data; | 165 | pdata = dev_get_platdata(&pdev->dev); |
166 | if (!pdata) { | 166 | if (!pdata) { |
167 | dev_err(dev, "cannot find device data\n"); | 167 | dev_err(dev, "cannot find device data\n"); |
168 | return -EINVAL; | 168 | return -EINVAL; |
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index d2d178c84ea7..8bc2879b4c87 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c | |||
@@ -330,7 +330,7 @@ static int twl4030_kp_program(struct twl4030_keypad *kp) | |||
330 | */ | 330 | */ |
331 | static int twl4030_kp_probe(struct platform_device *pdev) | 331 | static int twl4030_kp_probe(struct platform_device *pdev) |
332 | { | 332 | { |
333 | struct twl4030_keypad_data *pdata = pdev->dev.platform_data; | 333 | struct twl4030_keypad_data *pdata = dev_get_platdata(&pdev->dev); |
334 | const struct matrix_keymap_data *keymap_data; | 334 | const struct matrix_keymap_data *keymap_data; |
335 | struct twl4030_keypad *kp; | 335 | struct twl4030_keypad *kp; |
336 | struct input_dev *input; | 336 | struct input_dev *input; |
diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c index 7b039162a3f8..e03614f20d3b 100644 --- a/drivers/input/keyboard/w90p910_keypad.c +++ b/drivers/input/keyboard/w90p910_keypad.c | |||
@@ -121,7 +121,7 @@ static void w90p910_keypad_close(struct input_dev *dev) | |||
121 | static int w90p910_keypad_probe(struct platform_device *pdev) | 121 | static int w90p910_keypad_probe(struct platform_device *pdev) |
122 | { | 122 | { |
123 | const struct w90p910_keypad_platform_data *pdata = | 123 | const struct w90p910_keypad_platform_data *pdata = |
124 | pdev->dev.platform_data; | 124 | dev_get_platdata(&pdev->dev); |
125 | const struct matrix_keymap_data *keymap_data; | 125 | const struct matrix_keymap_data *keymap_data; |
126 | struct w90p910_keypad *keypad; | 126 | struct w90p910_keypad *keypad; |
127 | struct input_dev *input_dev; | 127 | struct input_dev *input_dev; |
diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c index 2e5d5e1de647..6deecdd3d11b 100644 --- a/drivers/input/misc/ad714x.c +++ b/drivers/input/misc/ad714x.c | |||
@@ -969,7 +969,7 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq, | |||
969 | int error; | 969 | int error; |
970 | struct input_dev *input[MAX_DEVICE_NUM]; | 970 | struct input_dev *input[MAX_DEVICE_NUM]; |
971 | 971 | ||
972 | struct ad714x_platform_data *plat_data = dev->platform_data; | 972 | struct ad714x_platform_data *plat_data = dev_get_platdata(dev); |
973 | struct ad714x_chip *ad714x; | 973 | struct ad714x_chip *ad714x; |
974 | void *drv_mem; | 974 | void *drv_mem; |
975 | unsigned long irqflags; | 975 | unsigned long irqflags; |
@@ -986,7 +986,7 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq, | |||
986 | goto err_out; | 986 | goto err_out; |
987 | } | 987 | } |
988 | 988 | ||
989 | if (dev->platform_data == NULL) { | 989 | if (dev_get_platdata(dev) == NULL) { |
990 | dev_err(dev, "platform data for ad714x doesn't exist\n"); | 990 | dev_err(dev, "platform data for ad714x doesn't exist\n"); |
991 | error = -EINVAL; | 991 | error = -EINVAL; |
992 | goto err_out; | 992 | goto err_out; |
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index 0735de3a6468..d2049972f70a 100644 --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c | |||
@@ -714,7 +714,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq, | |||
714 | 714 | ||
715 | ac->fifo_delay = fifo_delay_default; | 715 | ac->fifo_delay = fifo_delay_default; |
716 | 716 | ||
717 | pdata = dev->platform_data; | 717 | pdata = dev_get_platdata(dev); |
718 | if (!pdata) { | 718 | if (!pdata) { |
719 | dev_dbg(dev, | 719 | dev_dbg(dev, |
720 | "No platform data: Using default initialization\n"); | 720 | "No platform data: Using default initialization\n"); |
diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c index cd139cb17e32..7703447d1fd9 100644 --- a/drivers/input/misc/bfin_rotary.c +++ b/drivers/input/misc/bfin_rotary.c | |||
@@ -92,7 +92,7 @@ static irqreturn_t bfin_rotary_isr(int irq, void *dev_id) | |||
92 | 92 | ||
93 | static int bfin_rotary_probe(struct platform_device *pdev) | 93 | static int bfin_rotary_probe(struct platform_device *pdev) |
94 | { | 94 | { |
95 | struct bfin_rotary_platform_data *pdata = pdev->dev.platform_data; | 95 | struct bfin_rotary_platform_data *pdata = dev_get_platdata(&pdev->dev); |
96 | struct bfin_rot *rotary; | 96 | struct bfin_rot *rotary; |
97 | struct input_dev *input; | 97 | struct input_dev *input; |
98 | int error; | 98 | int error; |
diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c index 865c2f9d25b9..52d3a9b28f0b 100644 --- a/drivers/input/misc/bma150.c +++ b/drivers/input/misc/bma150.c | |||
@@ -526,7 +526,8 @@ static int bma150_register_polled_device(struct bma150_data *bma150) | |||
526 | static int bma150_probe(struct i2c_client *client, | 526 | static int bma150_probe(struct i2c_client *client, |
527 | const struct i2c_device_id *id) | 527 | const struct i2c_device_id *id) |
528 | { | 528 | { |
529 | const struct bma150_platform_data *pdata = client->dev.platform_data; | 529 | const struct bma150_platform_data *pdata = |
530 | dev_get_platdata(&client->dev); | ||
530 | const struct bma150_cfg *cfg; | 531 | const struct bma150_cfg *cfg; |
531 | struct bma150_data *bma150; | 532 | struct bma150_data *bma150; |
532 | int chip_id; | 533 | int chip_id; |
diff --git a/drivers/input/misc/cma3000_d0x.c b/drivers/input/misc/cma3000_d0x.c index df9b756594f8..c7d00748277b 100644 --- a/drivers/input/misc/cma3000_d0x.c +++ b/drivers/input/misc/cma3000_d0x.c | |||
@@ -284,7 +284,7 @@ EXPORT_SYMBOL(cma3000_resume); | |||
284 | struct cma3000_accl_data *cma3000_init(struct device *dev, int irq, | 284 | struct cma3000_accl_data *cma3000_init(struct device *dev, int irq, |
285 | const struct cma3000_bus_ops *bops) | 285 | const struct cma3000_bus_ops *bops) |
286 | { | 286 | { |
287 | const struct cma3000_platform_data *pdata = dev->platform_data; | 287 | const struct cma3000_platform_data *pdata = dev_get_platdata(dev); |
288 | struct cma3000_accl_data *data; | 288 | struct cma3000_accl_data *data; |
289 | struct input_dev *input_dev; | 289 | struct input_dev *input_dev; |
290 | int rev; | 290 | int rev; |
diff --git a/drivers/input/misc/gp2ap002a00f.c b/drivers/input/misc/gp2ap002a00f.c index fe30bd0fe4bd..de21e317da32 100644 --- a/drivers/input/misc/gp2ap002a00f.c +++ b/drivers/input/misc/gp2ap002a00f.c | |||
@@ -125,7 +125,7 @@ static int gp2a_initialize(struct gp2a_data *dt) | |||
125 | static int gp2a_probe(struct i2c_client *client, | 125 | static int gp2a_probe(struct i2c_client *client, |
126 | const struct i2c_device_id *id) | 126 | const struct i2c_device_id *id) |
127 | { | 127 | { |
128 | const struct gp2a_platform_data *pdata = client->dev.platform_data; | 128 | const struct gp2a_platform_data *pdata = dev_get_platdata(&client->dev); |
129 | struct gp2a_data *dt; | 129 | struct gp2a_data *dt; |
130 | int error; | 130 | int error; |
131 | 131 | ||
diff --git a/drivers/input/misc/gpio_tilt_polled.c b/drivers/input/misc/gpio_tilt_polled.c index 714c68369134..38b3c11a8ae9 100644 --- a/drivers/input/misc/gpio_tilt_polled.c +++ b/drivers/input/misc/gpio_tilt_polled.c | |||
@@ -98,7 +98,8 @@ static void gpio_tilt_polled_close(struct input_polled_dev *dev) | |||
98 | 98 | ||
99 | static int gpio_tilt_polled_probe(struct platform_device *pdev) | 99 | static int gpio_tilt_polled_probe(struct platform_device *pdev) |
100 | { | 100 | { |
101 | const struct gpio_tilt_platform_data *pdata = pdev->dev.platform_data; | 101 | const struct gpio_tilt_platform_data *pdata = |
102 | dev_get_platdata(&pdev->dev); | ||
102 | struct device *dev = &pdev->dev; | 103 | struct device *dev = &pdev->dev; |
103 | struct gpio_tilt_polled_dev *tdev; | 104 | struct gpio_tilt_polled_dev *tdev; |
104 | struct input_polled_dev *poll_dev; | 105 | struct input_polled_dev *poll_dev; |
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index a993b67a8a5b..d708478bc5b5 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c | |||
@@ -509,7 +509,8 @@ out: | |||
509 | static int kxtj9_probe(struct i2c_client *client, | 509 | static int kxtj9_probe(struct i2c_client *client, |
510 | const struct i2c_device_id *id) | 510 | const struct i2c_device_id *id) |
511 | { | 511 | { |
512 | const struct kxtj9_platform_data *pdata = client->dev.platform_data; | 512 | const struct kxtj9_platform_data *pdata = |
513 | dev_get_platdata(&client->dev); | ||
513 | struct kxtj9_data *tj9; | 514 | struct kxtj9_data *tj9; |
514 | int err; | 515 | int err; |
515 | 516 | ||
diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c index 940566e7be13..8ef288e7c971 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c | |||
@@ -68,7 +68,7 @@ static int pwm_beeper_event(struct input_dev *input, | |||
68 | 68 | ||
69 | static int pwm_beeper_probe(struct platform_device *pdev) | 69 | static int pwm_beeper_probe(struct platform_device *pdev) |
70 | { | 70 | { |
71 | unsigned long pwm_id = (unsigned long)pdev->dev.platform_data; | 71 | unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev); |
72 | struct pwm_beeper *beeper; | 72 | struct pwm_beeper *beeper; |
73 | int error; | 73 | int error; |
74 | 74 | ||
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 68a5f33152a8..d993775a7c39 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c | |||
@@ -193,7 +193,7 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata, | |||
193 | 193 | ||
194 | static int twl4030_vibra_probe(struct platform_device *pdev) | 194 | static int twl4030_vibra_probe(struct platform_device *pdev) |
195 | { | 195 | { |
196 | struct twl4030_vibra_data *pdata = pdev->dev.platform_data; | 196 | struct twl4030_vibra_data *pdata = dev_get_platdata(&pdev->dev); |
197 | struct device_node *twl4030_core_node = pdev->dev.parent->of_node; | 197 | struct device_node *twl4030_core_node = pdev->dev.parent->of_node; |
198 | struct vibra_info *info; | 198 | struct vibra_info *info; |
199 | int ret; | 199 | int ret; |
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index 6b44413f54e3..6810a4626a2a 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c | |||
@@ -48,7 +48,7 @@ static void gpio_mouse_scan(struct input_polled_dev *dev) | |||
48 | 48 | ||
49 | static int gpio_mouse_probe(struct platform_device *pdev) | 49 | static int gpio_mouse_probe(struct platform_device *pdev) |
50 | { | 50 | { |
51 | struct gpio_mouse_platform_data *pdata = pdev->dev.platform_data; | 51 | struct gpio_mouse_platform_data *pdata = dev_get_platdata(&pdev->dev); |
52 | struct input_polled_dev *input_poll; | 52 | struct input_polled_dev *input_poll; |
53 | struct input_dev *input; | 53 | struct input_dev *input; |
54 | int pin, i; | 54 | int pin, i; |
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c index 0ecb9e7945eb..d20d2ae5f1ee 100644 --- a/drivers/input/mouse/pxa930_trkball.c +++ b/drivers/input/mouse/pxa930_trkball.c | |||
@@ -166,7 +166,7 @@ static int pxa930_trkball_probe(struct platform_device *pdev) | |||
166 | if (!trkball) | 166 | if (!trkball) |
167 | return -ENOMEM; | 167 | return -ENOMEM; |
168 | 168 | ||
169 | trkball->pdata = pdev->dev.platform_data; | 169 | trkball->pdata = dev_get_platdata(&pdev->dev); |
170 | if (!trkball->pdata) { | 170 | if (!trkball->pdata) { |
171 | dev_err(&pdev->dev, "no platform data defined\n"); | 171 | dev_err(&pdev->dev, "no platform data defined\n"); |
172 | error = -EINVAL; | 172 | error = -EINVAL; |
diff --git a/drivers/input/touchscreen/88pm860x-ts.c b/drivers/input/touchscreen/88pm860x-ts.c index f7de14a268bf..544e20c551f8 100644 --- a/drivers/input/touchscreen/88pm860x-ts.c +++ b/drivers/input/touchscreen/88pm860x-ts.c | |||
@@ -172,7 +172,7 @@ static int pm860x_touch_dt_init(struct platform_device *pdev, | |||
172 | static int pm860x_touch_probe(struct platform_device *pdev) | 172 | static int pm860x_touch_probe(struct platform_device *pdev) |
173 | { | 173 | { |
174 | struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); | 174 | struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); |
175 | struct pm860x_touch_pdata *pdata = pdev->dev.platform_data; | 175 | struct pm860x_touch_pdata *pdata = dev_get_platdata(&pdev->dev); |
176 | struct pm860x_touch *touch; | 176 | struct pm860x_touch *touch; |
177 | struct i2c_client *i2c = (chip->id == CHIP_PM8607) ? chip->client \ | 177 | struct i2c_client *i2c = (chip->id == CHIP_PM8607) ? chip->client \ |
178 | : chip->companion; | 178 | : chip->companion; |
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 69834dd3c313..b9f9bcb22683 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c | |||
@@ -686,7 +686,7 @@ static int ad7877_probe(struct spi_device *spi) | |||
686 | { | 686 | { |
687 | struct ad7877 *ts; | 687 | struct ad7877 *ts; |
688 | struct input_dev *input_dev; | 688 | struct input_dev *input_dev; |
689 | struct ad7877_platform_data *pdata = spi->dev.platform_data; | 689 | struct ad7877_platform_data *pdata = dev_get_platdata(&spi->dev); |
690 | int err; | 690 | int err; |
691 | u16 verify; | 691 | u16 verify; |
692 | 692 | ||
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index facd3057b62d..a0364d8ae6c6 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c | |||
@@ -470,7 +470,7 @@ static int ad7879_gpio_add(struct ad7879 *ts, | |||
470 | 470 | ||
471 | static void ad7879_gpio_remove(struct ad7879 *ts) | 471 | static void ad7879_gpio_remove(struct ad7879 *ts) |
472 | { | 472 | { |
473 | const struct ad7879_platform_data *pdata = ts->dev->platform_data; | 473 | const struct ad7879_platform_data *pdata = dev_get_platdata(ts->dev); |
474 | int ret; | 474 | int ret; |
475 | 475 | ||
476 | if (pdata->gpio_export) { | 476 | if (pdata->gpio_export) { |
@@ -495,7 +495,7 @@ static inline void ad7879_gpio_remove(struct ad7879 *ts) | |||
495 | struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq, | 495 | struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq, |
496 | const struct ad7879_bus_ops *bops) | 496 | const struct ad7879_bus_ops *bops) |
497 | { | 497 | { |
498 | struct ad7879_platform_data *pdata = dev->platform_data; | 498 | struct ad7879_platform_data *pdata = dev_get_platdata(dev); |
499 | struct ad7879 *ts; | 499 | struct ad7879 *ts; |
500 | struct input_dev *input_dev; | 500 | struct input_dev *input_dev; |
501 | int err; | 501 | int err; |
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 59aa24002c7b..37ea05741d20 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -1130,7 +1130,7 @@ static void mxt_input_close(struct input_dev *dev) | |||
1130 | static int mxt_probe(struct i2c_client *client, | 1130 | static int mxt_probe(struct i2c_client *client, |
1131 | const struct i2c_device_id *id) | 1131 | const struct i2c_device_id *id) |
1132 | { | 1132 | { |
1133 | const struct mxt_platform_data *pdata = client->dev.platform_data; | 1133 | const struct mxt_platform_data *pdata = dev_get_platdata(&client->dev); |
1134 | struct mxt_data *data; | 1134 | struct mxt_data *data; |
1135 | struct input_dev *input_dev; | 1135 | struct input_dev *input_dev; |
1136 | int error; | 1136 | int error; |
diff --git a/drivers/input/touchscreen/atmel_tsadcc.c b/drivers/input/touchscreen/atmel_tsadcc.c index bddabc595077..f7d1ea5849ba 100644 --- a/drivers/input/touchscreen/atmel_tsadcc.c +++ b/drivers/input/touchscreen/atmel_tsadcc.c | |||
@@ -182,7 +182,7 @@ static int atmel_tsadcc_probe(struct platform_device *pdev) | |||
182 | struct atmel_tsadcc *ts_dev; | 182 | struct atmel_tsadcc *ts_dev; |
183 | struct input_dev *input_dev; | 183 | struct input_dev *input_dev; |
184 | struct resource *res; | 184 | struct resource *res; |
185 | struct at91_tsadcc_data *pdata = pdev->dev.platform_data; | 185 | struct at91_tsadcc_data *pdata = dev_get_platdata(&pdev->dev); |
186 | int err; | 186 | int err; |
187 | unsigned int prsc; | 187 | unsigned int prsc; |
188 | unsigned int reg; | 188 | unsigned int reg; |
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 8c651985a5c4..5bf1aeeea825 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c | |||
@@ -178,7 +178,7 @@ static irqreturn_t cy8ctmg110_irq_thread(int irq, void *dev_id) | |||
178 | static int cy8ctmg110_probe(struct i2c_client *client, | 178 | static int cy8ctmg110_probe(struct i2c_client *client, |
179 | const struct i2c_device_id *id) | 179 | const struct i2c_device_id *id) |
180 | { | 180 | { |
181 | const struct cy8ctmg110_pdata *pdata = client->dev.platform_data; | 181 | const struct cy8ctmg110_pdata *pdata = dev_get_platdata(&client->dev); |
182 | struct cy8ctmg110 *ts; | 182 | struct cy8ctmg110 *ts; |
183 | struct input_dev *input_dev; | 183 | struct input_dev *input_dev; |
184 | int err; | 184 | int err; |
diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index d53e0b72a407..56088eceacdc 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c | |||
@@ -534,7 +534,7 @@ static void cyttsp_close(struct input_dev *dev) | |||
534 | struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, | 534 | struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, |
535 | struct device *dev, int irq, size_t xfer_buf_size) | 535 | struct device *dev, int irq, size_t xfer_buf_size) |
536 | { | 536 | { |
537 | const struct cyttsp_platform_data *pdata = dev->platform_data; | 537 | const struct cyttsp_platform_data *pdata = dev_get_platdata(dev); |
538 | struct cyttsp *ts; | 538 | struct cyttsp *ts; |
539 | struct input_dev *input_dev; | 539 | struct input_dev *input_dev; |
540 | int error; | 540 | int error; |
@@ -553,7 +553,7 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, | |||
553 | 553 | ||
554 | ts->dev = dev; | 554 | ts->dev = dev; |
555 | ts->input = input_dev; | 555 | ts->input = input_dev; |
556 | ts->pdata = dev->platform_data; | 556 | ts->pdata = dev_get_platdata(dev); |
557 | ts->bus_ops = bus_ops; | 557 | ts->bus_ops = bus_ops; |
558 | ts->irq = irq; | 558 | ts->irq = irq; |
559 | 559 | ||
diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index 34ad84105e6e..ea0f7645220f 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c | |||
@@ -299,7 +299,7 @@ static void da9034_touch_close(struct input_dev *dev) | |||
299 | 299 | ||
300 | static int da9034_touch_probe(struct platform_device *pdev) | 300 | static int da9034_touch_probe(struct platform_device *pdev) |
301 | { | 301 | { |
302 | struct da9034_touch_pdata *pdata = pdev->dev.platform_data; | 302 | struct da9034_touch_pdata *pdata = dev_get_platdata(&pdev->dev); |
303 | struct da9034_touch *touch; | 303 | struct da9034_touch *touch; |
304 | struct input_dev *input_dev; | 304 | struct input_dev *input_dev; |
305 | int ret; | 305 | int ret; |
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 83fa1b15a97f..af0d68b703b7 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c | |||
@@ -705,7 +705,7 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, | |||
705 | const struct i2c_device_id *id) | 705 | const struct i2c_device_id *id) |
706 | { | 706 | { |
707 | const struct edt_ft5x06_platform_data *pdata = | 707 | const struct edt_ft5x06_platform_data *pdata = |
708 | client->dev.platform_data; | 708 | dev_get_platdata(&client->dev); |
709 | struct edt_ft5x06_ts_data *tsdata; | 709 | struct edt_ft5x06_ts_data *tsdata; |
710 | struct input_dev *input; | 710 | struct input_dev *input; |
711 | int error; | 711 | int error; |
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 1ce3d29ffca5..b1884ddd7a84 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c | |||
@@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev) | |||
157 | static int eeti_ts_probe(struct i2c_client *client, | 157 | static int eeti_ts_probe(struct i2c_client *client, |
158 | const struct i2c_device_id *idp) | 158 | const struct i2c_device_id *idp) |
159 | { | 159 | { |
160 | struct eeti_ts_platform_data *pdata = client->dev.platform_data; | 160 | struct eeti_ts_platform_data *pdata = dev_get_platdata(&client->dev); |
161 | struct eeti_ts_priv *priv; | 161 | struct eeti_ts_priv *priv; |
162 | struct input_dev *input; | 162 | struct input_dev *input; |
163 | unsigned int irq_flags; | 163 | unsigned int irq_flags; |
diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c index 1418bdda61bb..2a5089139818 100644 --- a/drivers/input/touchscreen/ili210x.c +++ b/drivers/input/touchscreen/ili210x.c | |||
@@ -184,7 +184,7 @@ static int ili210x_i2c_probe(struct i2c_client *client, | |||
184 | const struct i2c_device_id *id) | 184 | const struct i2c_device_id *id) |
185 | { | 185 | { |
186 | struct device *dev = &client->dev; | 186 | struct device *dev = &client->dev; |
187 | const struct ili210x_platform_data *pdata = dev->platform_data; | 187 | const struct ili210x_platform_data *pdata = dev_get_platdata(dev); |
188 | struct ili210x *priv; | 188 | struct ili210x *priv; |
189 | struct input_dev *input; | 189 | struct input_dev *input; |
190 | struct panel_info panel; | 190 | struct panel_info panel; |
diff --git a/drivers/input/touchscreen/mcs5000_ts.c b/drivers/input/touchscreen/mcs5000_ts.c index f9f4e0c56eda..58486f135a4c 100644 --- a/drivers/input/touchscreen/mcs5000_ts.c +++ b/drivers/input/touchscreen/mcs5000_ts.c | |||
@@ -194,7 +194,7 @@ static int mcs5000_ts_probe(struct i2c_client *client, | |||
194 | struct input_dev *input_dev; | 194 | struct input_dev *input_dev; |
195 | int ret; | 195 | int ret; |
196 | 196 | ||
197 | if (!client->dev.platform_data) | 197 | if (!dev_get_platdata(&client->dev)) |
198 | return -EINVAL; | 198 | return -EINVAL; |
199 | 199 | ||
200 | data = kzalloc(sizeof(struct mcs5000_ts_data), GFP_KERNEL); | 200 | data = kzalloc(sizeof(struct mcs5000_ts_data), GFP_KERNEL); |
@@ -207,7 +207,7 @@ static int mcs5000_ts_probe(struct i2c_client *client, | |||
207 | 207 | ||
208 | data->client = client; | 208 | data->client = client; |
209 | data->input_dev = input_dev; | 209 | data->input_dev = input_dev; |
210 | data->platform_data = client->dev.platform_data; | 210 | data->platform_data = dev_get_platdata(&client->dev); |
211 | 211 | ||
212 | input_dev->name = "MELPAS MCS-5000 Touchscreen"; | 212 | input_dev->name = "MELPAS MCS-5000 Touchscreen"; |
213 | input_dev->id.bustype = BUS_I2C; | 213 | input_dev->id.bustype = BUS_I2C; |
diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c index 6cc6b36663ff..02392d2061d6 100644 --- a/drivers/input/touchscreen/pixcir_i2c_ts.c +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c | |||
@@ -128,7 +128,8 @@ static SIMPLE_DEV_PM_OPS(pixcir_dev_pm_ops, | |||
128 | static int pixcir_i2c_ts_probe(struct i2c_client *client, | 128 | static int pixcir_i2c_ts_probe(struct i2c_client *client, |
129 | const struct i2c_device_id *id) | 129 | const struct i2c_device_id *id) |
130 | { | 130 | { |
131 | const struct pixcir_ts_platform_data *pdata = client->dev.platform_data; | 131 | const struct pixcir_ts_platform_data *pdata = |
132 | dev_get_platdata(&client->dev); | ||
132 | struct pixcir_i2c_ts_data *tsdata; | 133 | struct pixcir_i2c_ts_data *tsdata; |
133 | struct input_dev *input; | 134 | struct input_dev *input; |
134 | int error; | 135 | int error; |
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index b061af2c8376..d32bd9e6d215 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c | |||
@@ -251,7 +251,7 @@ static int s3c2410ts_probe(struct platform_device *pdev) | |||
251 | 251 | ||
252 | ts.dev = dev; | 252 | ts.dev = dev; |
253 | 253 | ||
254 | info = pdev->dev.platform_data; | 254 | info = dev_get_platdata(&pdev->dev); |
255 | if (!info) { | 255 | if (!info) { |
256 | dev_err(dev, "no platform data, cannot attach\n"); | 256 | dev_err(dev, "no platform data, cannot attach\n"); |
257 | return -EINVAL; | 257 | return -EINVAL; |
@@ -392,7 +392,7 @@ static int s3c2410ts_suspend(struct device *dev) | |||
392 | static int s3c2410ts_resume(struct device *dev) | 392 | static int s3c2410ts_resume(struct device *dev) |
393 | { | 393 | { |
394 | struct platform_device *pdev = to_platform_device(dev); | 394 | struct platform_device *pdev = to_platform_device(dev); |
395 | struct s3c2410_ts_mach_info *info = pdev->dev.platform_data; | 395 | struct s3c2410_ts_mach_info *info = dev_get_platdata(&pdev->dev); |
396 | 396 | ||
397 | clk_enable(ts.clock); | 397 | clk_enable(ts.clock); |
398 | enable_irq(ts.irq_tc); | 398 | enable_irq(ts.irq_tc); |
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index 2f03b2f289dd..5c342b3139e8 100644 --- a/drivers/input/touchscreen/st1232.c +++ b/drivers/input/touchscreen/st1232.c | |||
@@ -154,7 +154,7 @@ static int st1232_ts_probe(struct i2c_client *client, | |||
154 | const struct i2c_device_id *id) | 154 | const struct i2c_device_id *id) |
155 | { | 155 | { |
156 | struct st1232_ts_data *ts; | 156 | struct st1232_ts_data *ts; |
157 | struct st1232_pdata *pdata = client->dev.platform_data; | 157 | struct st1232_pdata *pdata = dev_get_platdata(&client->dev); |
158 | struct input_dev *input_dev; | 158 | struct input_dev *input_dev; |
159 | int error; | 159 | int error; |
160 | 160 | ||
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 811353353917..550adcbbfc23 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c | |||
@@ -571,7 +571,7 @@ static void tsc2005_setup_spi_xfer(struct tsc2005 *ts) | |||
571 | 571 | ||
572 | static int tsc2005_probe(struct spi_device *spi) | 572 | static int tsc2005_probe(struct spi_device *spi) |
573 | { | 573 | { |
574 | const struct tsc2005_platform_data *pdata = spi->dev.platform_data; | 574 | const struct tsc2005_platform_data *pdata = dev_get_platdata(&spi->dev); |
575 | struct tsc2005 *ts; | 575 | struct tsc2005 *ts; |
576 | struct input_dev *input_dev; | 576 | struct input_dev *input_dev; |
577 | unsigned int max_x, max_y, max_p; | 577 | unsigned int max_x, max_y, max_p; |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 1271f97b4079..5b3ca807d179 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
@@ -320,7 +320,7 @@ static int ucb1400_ts_detect_irq(struct ucb1400_ts *ucb, | |||
320 | 320 | ||
321 | static int ucb1400_ts_probe(struct platform_device *pdev) | 321 | static int ucb1400_ts_probe(struct platform_device *pdev) |
322 | { | 322 | { |
323 | struct ucb1400_ts *ucb = pdev->dev.platform_data; | 323 | struct ucb1400_ts *ucb = dev_get_platdata(&pdev->dev); |
324 | int error, x_res, y_res; | 324 | int error, x_res, y_res; |
325 | u16 fcsr; | 325 | u16 fcsr; |
326 | 326 | ||
@@ -399,7 +399,7 @@ err: | |||
399 | 399 | ||
400 | static int ucb1400_ts_remove(struct platform_device *pdev) | 400 | static int ucb1400_ts_remove(struct platform_device *pdev) |
401 | { | 401 | { |
402 | struct ucb1400_ts *ucb = pdev->dev.platform_data; | 402 | struct ucb1400_ts *ucb = dev_get_platdata(&pdev->dev); |
403 | 403 | ||
404 | free_irq(ucb->irq, ucb); | 404 | free_irq(ucb->irq, ucb); |
405 | input_unregister_device(ucb->ts_idev); | 405 | input_unregister_device(ucb->ts_idev); |
@@ -410,7 +410,7 @@ static int ucb1400_ts_remove(struct platform_device *pdev) | |||
410 | #ifdef CONFIG_PM_SLEEP | 410 | #ifdef CONFIG_PM_SLEEP |
411 | static int ucb1400_ts_suspend(struct device *dev) | 411 | static int ucb1400_ts_suspend(struct device *dev) |
412 | { | 412 | { |
413 | struct ucb1400_ts *ucb = dev->platform_data; | 413 | struct ucb1400_ts *ucb = dev_get_platdata(dev); |
414 | struct input_dev *idev = ucb->ts_idev; | 414 | struct input_dev *idev = ucb->ts_idev; |
415 | 415 | ||
416 | mutex_lock(&idev->mutex); | 416 | mutex_lock(&idev->mutex); |
@@ -424,7 +424,7 @@ static int ucb1400_ts_suspend(struct device *dev) | |||
424 | 424 | ||
425 | static int ucb1400_ts_resume(struct device *dev) | 425 | static int ucb1400_ts_resume(struct device *dev) |
426 | { | 426 | { |
427 | struct ucb1400_ts *ucb = dev->platform_data; | 427 | struct ucb1400_ts *ucb = dev_get_platdata(dev); |
428 | struct input_dev *idev = ucb->ts_idev; | 428 | struct input_dev *idev = ucb->ts_idev; |
429 | 429 | ||
430 | mutex_lock(&idev->mutex); | 430 | mutex_lock(&idev->mutex); |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index 7e45c9f6e6b7..d0ef91fc87d1 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -584,7 +584,7 @@ static void wm97xx_ts_input_close(struct input_dev *idev) | |||
584 | static int wm97xx_probe(struct device *dev) | 584 | static int wm97xx_probe(struct device *dev) |
585 | { | 585 | { |
586 | struct wm97xx *wm; | 586 | struct wm97xx *wm; |
587 | struct wm97xx_pdata *pdata = dev->platform_data; | 587 | struct wm97xx_pdata *pdata = dev_get_platdata(dev); |
588 | int ret = 0, id = 0; | 588 | int ret = 0, id = 0; |
589 | 589 | ||
590 | wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL); | 590 | wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL); |