Merge tag 'tags/mvebu-irqchip-fixes-3.13' into mvebu/irqchip
[firefly-linux-kernel-4.4.55.git] / drivers / input / touchscreen / ucb1400_ts.c
index 1271f97b40791bd983b6342bb3e2459bba9deef4..b46c55cd1bbb89ada7b5d3aaf5959b3dd55554a3 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
 #include <linux/wait.h>
@@ -320,7 +319,7 @@ static int ucb1400_ts_detect_irq(struct ucb1400_ts *ucb,
 
 static int ucb1400_ts_probe(struct platform_device *pdev)
 {
-       struct ucb1400_ts *ucb = pdev->dev.platform_data;
+       struct ucb1400_ts *ucb = dev_get_platdata(&pdev->dev);
        int error, x_res, y_res;
        u16 fcsr;
 
@@ -399,7 +398,7 @@ err:
 
 static int ucb1400_ts_remove(struct platform_device *pdev)
 {
-       struct ucb1400_ts *ucb = pdev->dev.platform_data;
+       struct ucb1400_ts *ucb = dev_get_platdata(&pdev->dev);
 
        free_irq(ucb->irq, ucb);
        input_unregister_device(ucb->ts_idev);
@@ -410,7 +409,7 @@ static int ucb1400_ts_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM_SLEEP
 static int ucb1400_ts_suspend(struct device *dev)
 {
-       struct ucb1400_ts *ucb = dev->platform_data;
+       struct ucb1400_ts *ucb = dev_get_platdata(dev);
        struct input_dev *idev = ucb->ts_idev;
 
        mutex_lock(&idev->mutex);
@@ -424,7 +423,7 @@ static int ucb1400_ts_suspend(struct device *dev)
 
 static int ucb1400_ts_resume(struct device *dev)
 {
-       struct ucb1400_ts *ucb = dev->platform_data;
+       struct ucb1400_ts *ucb = dev_get_platdata(dev);
        struct input_dev *idev = ucb->ts_idev;
 
        mutex_lock(&idev->mutex);