diff options
| author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-05-21 11:39:13 -0400 |
|---|---|---|
| committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-06-12 12:36:30 -0400 |
| commit | b9194fdfa6e729b97ffc59ae00dc9d51c7ae314d (patch) | |
| tree | e172eba807ce3f8a8f4210429aa9ad9ae0b820df /drivers/input/touchscreen | |
| parent | 0396310b0eba71595c1151ce7c8fde7a9f33f719 (diff) | |
input: ti_am33x_tsc: remove platform_data support
This patch removes access to platform data mfd_tscadc_board because the
platform is DT only.
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'drivers/input/touchscreen')
| -rw-r--r-- | drivers/input/touchscreen/ti_am335x_tsc.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index 449c0fbbe1d6..a1db55d1a862 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
| 25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
| 26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
| 27 | #include <linux/input/ti_am335x_tsc.h> | ||
| 28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
| 29 | #include <linux/of.h> | 28 | #include <linux/of.h> |
| 30 | #include <linux/of_device.h> | 29 | #include <linux/of_device.h> |
| @@ -347,24 +346,6 @@ static int titsc_parse_dt(struct platform_device *pdev, | |||
| 347 | ts_dev->config_inp, ARRAY_SIZE(ts_dev->config_inp)); | 346 | ts_dev->config_inp, ARRAY_SIZE(ts_dev->config_inp)); |
| 348 | } | 347 | } |
| 349 | 348 | ||
| 350 | static int titsc_parse_pdata(struct ti_tscadc_dev *tscadc_dev, | ||
| 351 | struct titsc *ts_dev) | ||
| 352 | { | ||
| 353 | struct mfd_tscadc_board *pdata = tscadc_dev->dev->platform_data; | ||
| 354 | |||
| 355 | if (!pdata) | ||
| 356 | return -EINVAL; | ||
| 357 | |||
| 358 | ts_dev->wires = pdata->tsc_init->wires; | ||
| 359 | ts_dev->x_plate_resistance = | ||
| 360 | pdata->tsc_init->x_plate_resistance; | ||
| 361 | ts_dev->steps_to_configure = | ||
| 362 | pdata->tsc_init->steps_to_configure; | ||
| 363 | memcpy(ts_dev->config_inp, pdata->tsc_init->wire_config, | ||
| 364 | sizeof(pdata->tsc_init->wire_config)); | ||
| 365 | return 0; | ||
| 366 | } | ||
| 367 | |||
| 368 | /* | 349 | /* |
| 369 | * The functions for inserting/removing driver as a module. | 350 | * The functions for inserting/removing driver as a module. |
| 370 | */ | 351 | */ |
| @@ -390,11 +371,7 @@ static int titsc_probe(struct platform_device *pdev) | |||
| 390 | ts_dev->input = input_dev; | 371 | ts_dev->input = input_dev; |
| 391 | ts_dev->irq = tscadc_dev->irq; | 372 | ts_dev->irq = tscadc_dev->irq; |
| 392 | 373 | ||
| 393 | if (tscadc_dev->dev->platform_data) | 374 | err = titsc_parse_dt(pdev, ts_dev); |
| 394 | err = titsc_parse_pdata(tscadc_dev, ts_dev); | ||
| 395 | else | ||
| 396 | err = titsc_parse_dt(pdev, ts_dev); | ||
| 397 | |||
| 398 | if (err) { | 375 | if (err) { |
| 399 | dev_err(&pdev->dev, "Could not find valid DT data.\n"); | 376 | dev_err(&pdev->dev, "Could not find valid DT data.\n"); |
| 400 | goto err_free_mem; | 377 | goto err_free_mem; |
