From patchwork Sat Apr 6 06:46:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2401001 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 B3328DFB7B for ; Sat, 6 Apr 2013 06:46:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753566Ab3DFGqZ (ORCPT ); Sat, 6 Apr 2013 02:46:25 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:51926 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753436Ab3DFGqZ (ORCPT ); Sat, 6 Apr 2013 02:46:25 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKT00DW4MT2J6E0@mailout3.samsung.com> for linux-input@vger.kernel.org; Sat, 06 Apr 2013 15:46:24 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 0D.FD.12250.0C4CF515; Sat, 06 Apr 2013 15:46:24 +0900 (KST) X-AuditID: cbfee691-b7f5f6d000002fda-de-515fc4c02bdd Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 92.63.17838.0C4CF515; Sat, 06 Apr 2013 15:46:24 +0900 (KST) Received: from DOJG1HAN02 ([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 <0MKT00D7IMTC2S00@mmp2.samsung.com>; Sat, 06 Apr 2013 15:46:24 +0900 (KST) From: Jingoo Han To: 'Dmitry Torokhov' Cc: 'Dmitry Torokhov' , linux-input@vger.kernel.org, 'Jingoo Han' Subject: [PATCH 1/3] Input: ads7846 - use spi_get_drvdata() and spi_set_drvdata() Date: Sat, 06 Apr 2013 15:46:23 +0900 Message-id: <001d01ce3292$746da5c0$5d48f140$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac4yknRQID1xMhIOTM+QsPTasOlYCA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsVy+t8zI90DR+IDDU7+FLQ4vOgFo8XD7S9Y LS4vvMRqcfPTN1YHFo+ds+6ye0yZe4TVo2/LKkaPz5vkAliiuGxSUnMyy1KL9O0SuDKufP7C WLCAo6Ljzyn2Bsb3bF2MnBwSAiYS696fZoSwxSQu3FsPFOfiEBJYxihx9Psm5i5GDrCi6fdj IOLTGSUen3rLBNIgJPCLUWLdQ1UQm01ATeLLl8PsIPUiAoYSM9ZUgZjMAukSZw96gFQICwRL /J2ynBXEZhFQlWiZ+oYVpIRXwFZizqtYkDCvgKDEj8n3WEBsZgEtifU7jzNB2PISm9e8hTpG XeLRX12QsIiAnsS1lYvZIUpEJPa9eMcIcqSEwC52iZY1q1ggVglIfJt8iAWiV1Zi0wFmiGcl JQ6uuMEygVFsFpLNs5BsnoVk8ywkKxYwsqxiFE0tSC4oTkovMtUrTswtLs1L10vOz93ECImu iTsY7x+wPsSYDLR+IrOUaHI+MDrzSuINjc2MLExNTI2NzC3NSBNWEudVb7EOFBJITyxJzU5N LUgtii8qzUktPsTIxMEp1cC4QlLOtX/2k0Wy29eaMHMcOWUe37hbK8AsXuSw5pE5KpNDfHqy Lrxd6iV8TWfqbM/12973fKy+/r37sajNNzl2xvWvX0zO0uiZsvrxnRU6KUUlBmZtLd9YJ02o uq5f922tnunlqlKnNeILJ1+74MoT4x6eOiFJw/To+d9azbkf7PN/dF1gZfBQYinOSDTUYi4q TgQAuA3x1cQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42I5/e+xoO6BI/GBBqvf8lgcXvSC0eLh9hes FpcXXmK1uPnpG6sDi8fOWXfZPabMPcLq0bdlFaPH501yASxRDYw2GamJKalFCql5yfkpmXnp tkrewfHO8aZmBoa6hpYW5koKeYm5qbZKLj4Bum6ZOUA7lRTKEnNKgUIBicXFSvp2mCaEhrjp WsA0Ruj6hgTB9RgZoIGEdYwZVz5/YSxYwFHR8ecUewPje7YuRg4OCQETien3Y7oYOYFMMYkL 99YDhbk4hASmM0o8PvWWCSQhJPCLUWLdQ1UQm01ATeLLl8PsIL0iAoYSM9ZUgZjMAukSZw96 gFQICwRL/J2ynBXEZhFQlWiZ+oYVpIRXwFZizqtYkDCvgKDEj8n3WEBsZgEtifU7jzNB2PIS m9e8ZYY4TF3i0V9dkLCIgJ7EtZWL2SFKRCT2vXjHOIFRYBaSSbOQTJqFZNIsJC0LGFlWMYqm FiQXFCel5xrqFSfmFpfmpesl5+duYgTH7jOpHYwrGywOMQpwMCrx8FrcjgsUYk0sK67MPcQo wcGsJMIr+xwoxJuSWFmVWpQfX1Sak1p8iDEZ6M+JzFKiyfnAtJJXEm9obGJmZGlkZmFkYm5O mrCSOO+BVutAIYH0xJLU7NTUgtQimC1MHJxSDYwO7Gtul65X7Wwrr5L+Exa0q2O5XvCDnN9d gjuyT3kovUnkm7psQfAe6ZVW5yedUN1xRzfiwSxZpj62LeY/D2W5+M7wyP0j03fbbsXfYz7c VXrf3yfNsxa9v2tOw+H6+/oZ8j/8a0s+72x52KBxTMBVLVg5LLEutCpw5q5W/pdnc1Qe655X 0VRiKc5INNRiLipOBABu8SDBIQMAAA== 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 spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han --- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 434c3df..84ccf14 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -1245,7 +1245,7 @@ static int ads7846_probe(struct spi_device *spi) goto err_free_mem; } - dev_set_drvdata(&spi->dev, ts); + spi_set_drvdata(spi, ts); ts->packet = packet; ts->spi = spi; @@ -1397,7 +1397,7 @@ static int ads7846_probe(struct spi_device *spi) static int ads7846_remove(struct spi_device *spi) { - struct ads7846 *ts = dev_get_drvdata(&spi->dev); + struct ads7846 *ts = spi_get_drvdata(spi); device_init_wakeup(&spi->dev, false);