From patchwork Thu May 23 10:25:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2606111 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B52E1DFB78 for ; Thu, 23 May 2013 10:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757976Ab3EWKZy (ORCPT ); Thu, 23 May 2013 06:25:54 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:36276 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757918Ab3EWKZy (ORCPT ); Thu, 23 May 2013 06:25:54 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MN800DE9YB5VO80@mailout1.samsung.com> for linux-input@vger.kernel.org; Thu, 23 May 2013 19:25:53 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.51]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 7B.A5.29708.1BEED915; Thu, 23 May 2013 19:25:53 +0900 (KST) X-AuditID: cbfee690-b7f6f6d00000740c-df-519deeb1fd4d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BA.A5.21068.0BEED915; Thu, 23 May 2013 19:25:53 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MN800BIVYB4R260@mmp2.samsung.com>; Thu, 23 May 2013 19:25:52 +0900 (KST) From: Jingoo Han To: 'Dmitry Torokhov' Cc: 'Dmitry Torokhov' , linux-input@vger.kernel.org, 'Jingoo Han' , 'Josh Wu' Subject: [PATCH] input: touchscreen: use platform_{get,set}_drvdata() Date: Thu, 23 May 2013 19:25:52 +0900 Message-id: <002701ce579f$e7237400$b56a5c00$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac5Xn7bGkPZJYaoEQ9OgUOnadMenMQ== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPIsWRmVeSWpSXmKPExsVy+t8zY92N7+YGGqx6w25xeNELRouH21+w WlxeeInVYlfjb1aLm5++sTqweiz4tZXFY+esu+weU+YeYfXo27KK0ePzJrkA1igum5TUnMyy 1CJ9uwSujHMPpzEWPOSuePrwF2sDYx9XFyMHh4SAicTahRpdjJxAppjEhXvr2boYuTiEBJYx ShxpfcUEkTCRuPTmMCtEYjqjxOmZWxghnF+MEhsaJrCDVLEJqEl8+XKYHWSqiIChxIw1VSA1 zAJtjBLrFnSwgsSFBVwlGnbmgZSzCKhK7Jq5G6yVV8BSYsKxVywQtqDEj8n3wGxmAS2J9TuP M0HY8hKb17xlhjhIQWLH2deMILaIgJ7EoW3HWSFqRCT2vXgHdpuEwDF2iZPPHzBDLBOQ+Db5 EAvEx7ISmw5AzZGUOLjiBssERrFZSFbPQrJ6FpLVs5CsWMDIsopRNLUguaA4Kb3IRK84Mbe4 NC9dLzk/dxMjJPIm7GC8d8D6EGMy0PqJzFKiyfnAyM0riTc0NjOyMDUxNTYytzQjTVhJnFe9 xTpQSCA9sSQ1OzW1ILUovqg0J7X4ECMTB6dUA2PSjC5ek7M3r2hUlfD8+O29/cZt+3VqPxn8 Hb1dp+9vaLj9bRebEa/HFOegTT/4dxjkXn39a+6nhOTjm+WUlPtnbmHnPH18zYKYk/WpIU2v nqe9/31N3yUgpU/z3RKNoyc4X32cduHXSfWzk//qZbEY9f1rnBY1x/Hzzo9+d/zeTIhp/Czl 8iVQiaU4I9FQi7moOBEAKpnP3dICAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLKsWRmVeSWpSXmKPExsVy+t9jQd2N7+YGGqx7xmxxeNELRouH21+w WlxeeInVYlfjb1aLm5++sTqweiz4tZXFY+esu+weU+YeYfXo27KK0ePzJrkA1qgGRpuM1MSU 1CKF1Lzk/JTMvHRbJe/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wcoO1KCmWJOaVAoYDE 4mIlfTtME0JD3HQtYBojdH1DguB6jAzQQMI6xoxzD6cxFjzkrnj68BdrA2MfVxcjJ4eEgInE pTeHWSFsMYkL99azdTFycQgJTGeUOD1zCyOE84tRYkPDBHaQKjYBNYkvXw4D2RwcIgKGEjPW VIHUMAu0MUqsW9DBChIXFnCVaNiZB1LOIqAqsWvmbrBWXgFLiQnHXrFA2IISPybfA7OZBbQk 1u88zgRhy0tsXvOWGeIgBYkdZ18zgtgiAnoSh7YdZ4WoEZHY9+Id4wRGgVlIRs1CMmoWklGz kLQsYGRZxSiaWpBcUJyUnmukV5yYW1yal66XnJ+7iREc2c+kdzCuarA4xCjAwajEwytxe06g EGtiWXFl7iFGCQ5mJRHezT1zA4V4UxIrq1KL8uOLSnNSiw8xJgN9OpFZSjQ5H5h08kriDY1N zIwsjcwsjEzMzUkTVhLnPdhqHSgkkJ5YkpqdmlqQWgSzhYmDU6qBsfaRxutEOQ0+rwTr21E/ d24SqS7RehHiOlF4hc026SpTy8rAjH+pQXyO9TO3/vC0/ilhcynKhSMz2fKM//LfZv/F4lsn Wb85/fZ5BwvrN6EjWzPmtm9NDLV4F7V6Z6ewvtWzt2yBmsabZI/sqz3NsO85j2Umw51aL4b/ HpVPX+3YbLm5w7JViaU4I9FQi7moOBEAUY1hITADAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han --- drivers/input/touchscreen/88pm860x-ts.c | 2 +- drivers/input/touchscreen/atmel_tsadcc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/88pm860x-ts.c b/drivers/input/touchscreen/88pm860x-ts.c index e8d4572..f7de14a 100644 --- a/drivers/input/touchscreen/88pm860x-ts.c +++ b/drivers/input/touchscreen/88pm860x-ts.c @@ -237,7 +237,7 @@ static int pm860x_touch_probe(struct platform_device *pdev) touch = kzalloc(sizeof(struct pm860x_touch), GFP_KERNEL); if (touch == NULL) return -ENOMEM; - dev_set_drvdata(&pdev->dev, touch); + platform_set_drvdata(pdev, touch); touch->idev = input_allocate_device(); if (touch->idev == NULL) { diff --git a/drivers/input/touchscreen/atmel_tsadcc.c b/drivers/input/touchscreen/atmel_tsadcc.c index 95f6785..75a0693 100644 --- a/drivers/input/touchscreen/atmel_tsadcc.c +++ b/drivers/input/touchscreen/atmel_tsadcc.c @@ -325,7 +325,7 @@ err_free_mem: static int atmel_tsadcc_remove(struct platform_device *pdev) { - struct atmel_tsadcc *ts_dev = dev_get_drvdata(&pdev->dev); + struct atmel_tsadcc *ts_dev = platform_get_drvdata(pdev); struct resource *res; free_irq(ts_dev->irq, ts_dev);