--- zzzz-none-000/linux-3.10.107/drivers/input/touchscreen/cyttsp_core.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/input/touchscreen/cyttsp_core.c 2021-02-04 17:41:59.000000000 +0000 @@ -84,7 +84,8 @@ int tries; for (tries = 0; tries < CY_NUM_RETRY; tries++) { - error = ts->bus_ops->read(ts, command, length, buf); + error = ts->bus_ops->read(ts->dev, ts->xfer_buf, command, + length, buf); if (!error) return 0; @@ -101,7 +102,8 @@ int tries; for (tries = 0; tries < CY_NUM_RETRY; tries++) { - error = ts->bus_ops->write(ts, command, length, buf); + error = ts->bus_ops->write(ts->dev, ts->xfer_buf, command, + length, buf); if (!error) return 0; @@ -240,7 +242,7 @@ int retval; /* wait for interrupt to set ready completion */ - INIT_COMPLETION(ts->bl_ready); + reinit_completion(&ts->bl_ready); ts->state = CY_BL_STATE; enable_irq(ts->irq); @@ -470,8 +472,7 @@ return 0; } -#ifdef CONFIG_PM_SLEEP -static int cyttsp_suspend(struct device *dev) +static int __maybe_unused cyttsp_suspend(struct device *dev) { struct cyttsp *ts = dev_get_drvdata(dev); int retval = 0; @@ -489,7 +490,7 @@ return retval; } -static int cyttsp_resume(struct device *dev) +static int __maybe_unused cyttsp_resume(struct device *dev) { struct cyttsp *ts = dev_get_drvdata(dev); @@ -505,8 +506,6 @@ return 0; } -#endif - SIMPLE_DEV_PM_OPS(cyttsp_pm_ops, cyttsp_suspend, cyttsp_resume); EXPORT_SYMBOL_GPL(cyttsp_pm_ops); @@ -532,7 +531,7 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops, struct device *dev, int irq, size_t xfer_buf_size) { - const struct cyttsp_platform_data *pdata = dev->platform_data; + const struct cyttsp_platform_data *pdata = dev_get_platdata(dev); struct cyttsp *ts; struct input_dev *input_dev; int error; @@ -551,7 +550,7 @@ ts->dev = dev; ts->input = input_dev; - ts->pdata = dev->platform_data; + ts->pdata = dev_get_platdata(dev); ts->bus_ops = bus_ops; ts->irq = irq;