From 508713c313603d41343c5a5295527fd2c9d91c9f Mon Sep 17 00:00:00 2001 From: Hong Liu Date: Tue, 12 Apr 2011 09:41:51 +0800 Subject: [PATCH] cyttsp: remove unnecessary pointer manipulation We store the pointer to struct cyttsp as driver data in cyttsp_core_init, and bus driver (cyttsp_i2c) will pass this driver data to cyttsp_core later. Change-Id: I56c506ccace2fe81c14c9277cba3bc1316fdc50c Signed-off-by: Hong Liu --- drivers/input/touchscreen/cyttsp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index e9fb703..8673494 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -1321,7 +1321,7 @@ bypass: int cyttsp_resume(void *handle) { int retval = 0; - struct cyttsp *ts = container_of(handle, struct cyttsp, pdev); + struct cyttsp *ts = handle; struct cyttsp_xydata xydata; dev_dbg(ts->pdev, "%s: enter\n", __func__); @@ -1364,7 +1364,7 @@ EXPORT_SYMBOL(cyttsp_resume); int cyttsp_suspend(void *handle) { - struct cyttsp *ts = container_of(handle, struct cyttsp, pdev); + struct cyttsp *ts = handle; u8 sleep_mode = 0; int retval = 0; -- 2.7.4