From patchwork Sat Apr 6 06:47:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2401021 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 9072DDFB7B for ; Sat, 6 Apr 2013 06:47:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754705Ab3DFGrP (ORCPT ); Sat, 6 Apr 2013 02:47:15 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:27639 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754607Ab3DFGrO (ORCPT ); Sat, 6 Apr 2013 02:47:14 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKT005XNMUP95D0@mailout2.samsung.com> for linux-input@vger.kernel.org; Sat, 06 Apr 2013 15:47:13 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.51]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 74.01.20872.1F4CF515; Sat, 06 Apr 2013 15:47:13 +0900 (KST) X-AuditID: cbfee68d-b7f786d000005188-70-515fc4f13dfb Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id B3.83.17838.1F4CF515; Sat, 06 Apr 2013 15:47:13 +0900 (KST) Received: from DOJG1HAN02 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKT006PIMUP2W30@mmp1.samsung.com>; Sat, 06 Apr 2013 15:47:13 +0900 (KST) From: Jingoo Han To: 'Dmitry Torokhov' Cc: 'Dmitry Torokhov' , linux-input@vger.kernel.org, 'Jingoo Han' References: <001d01ce3292$746da5c0$5d48f140$%han@samsung.com> In-reply-to: <001d01ce3292$746da5c0$5d48f140$%han@samsung.com> Subject: [PATCH 3/3] Input: adxl34x - use spi_get_drvdata() Date: Sat, 06 Apr 2013 15:47:12 +0900 Message-id: <001f01ce3292$91a72f30$b4f58d90$%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+QsPTasOlYCAAAA+tQ Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFIsWRmVeSWpSXmKPExsVy+t8zY92PR+IDDd4fFLI4vOgFo8XD7S9Y LS4vvMRqcfPTN1YHFo+ds+6ye0yZe4TVo2/LKkaPz5vkAliiuGxSUnMyy1KL9O0SuDJOfnnA WjCLu2Ln2w/MDYzrObsYOTkkBEwkFp5dzQphi0lcuLeerYuRi0NIYBmjxN1jh1lhijaces8M kVjEKPFx50t2COcXo8SfN72MIFVsAmoSX74cBkpwcIgIGErMWFMFYjILpEucPegBUiEkYCvR +/oFM4jNKWAnceDLXbD5wgLWEguPvGMCsVkEVCVOrprGBtLKC1S/eHU0SJhXQFDix+R7LCA2 s4CWxPqdx5kgbHmJzWveMoOUSwioSzz6qwsSFhEwknj3+gMbRImIxL4X7xghPrnELvHrshPE JgGJb5MPsUC0ykpsOsAMUSIpcXDFDZYJjBKzkCyehWTxLCSLZyHZsICRZRWjaGpBckFxUnqR oV5xYm5xaV66XnJ+7iZGSDz27mC8fcD6EGMy0PqJzFKiyfnAeM4riTc0NjOyMDUxNTYytzQj TVhJnFetxTpQSCA9sSQ1OzW1ILUovqg0J7X4ECMTB6dUA2PBc7kde6ud3ZiK4lawvlItef3K 69JOLgb9JJlqPhP3NS3xeR/b/jN8fvqA70jTBB1Jtc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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/misc/adxl34x-spi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c index 990b49e..76dc067 100644 --- a/drivers/input/misc/adxl34x-spi.c +++ b/drivers/input/misc/adxl34x-spi.c @@ -89,7 +89,7 @@ static int adxl34x_spi_probe(struct spi_device *spi) static int adxl34x_spi_remove(struct spi_device *spi) { - struct adxl34x *ac = dev_get_drvdata(&spi->dev); + struct adxl34x *ac = spi_get_drvdata(spi); return adxl34x_remove(ac); } @@ -98,7 +98,7 @@ static int adxl34x_spi_remove(struct spi_device *spi) static int adxl34x_spi_suspend(struct device *dev) { struct spi_device *spi = to_spi_device(dev); - struct adxl34x *ac = dev_get_drvdata(&spi->dev); + struct adxl34x *ac = spi_get_drvdata(spi); adxl34x_suspend(ac); @@ -108,7 +108,7 @@ static int adxl34x_spi_suspend(struct device *dev) static int adxl34x_spi_resume(struct device *dev) { struct spi_device *spi = to_spi_device(dev); - struct adxl34x *ac = dev_get_drvdata(&spi->dev); + struct adxl34x *ac = spi_get_drvdata(spi); adxl34x_resume(ac);