From patchwork Wed Aug 21 05:56:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2847463 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 42CBC9F239 for ; Wed, 21 Aug 2013 05:56:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42CF12041B for ; Wed, 21 Aug 2013 05:56:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E680920416 for ; Wed, 21 Aug 2013 05:56:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751964Ab3HUF42 (ORCPT ); Wed, 21 Aug 2013 01:56:28 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:29996 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751994Ab3HUF41 (ORCPT ); Wed, 21 Aug 2013 01:56:27 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MRV00DM79TT5MJ0@mailout4.samsung.com> for linux-mmc@vger.kernel.org; Wed, 21 Aug 2013 14:56:26 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.49]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id BC.F3.17404.A8654125; Wed, 21 Aug 2013 14:56:26 +0900 (KST) X-AuditID: cbfee68d-b7f096d0000043fc-5f-5214568a65ea Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 9E.A7.32250.98654125; Wed, 21 Aug 2013 14:56:26 +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 <0MRV0021U9U1W660@mmp2.samsung.com>; Wed, 21 Aug 2013 14:56:25 +0900 (KST) From: Jingoo Han To: 'Chris Ball' Cc: linux-mmc@vger.kernel.org, 'Sonic Zhang' , 'Jingoo Han' Subject: [PATCH RESEND] mmc: mmc_spi: use spi_get_drvdata() and spi_set_drvdata() Date: Wed, 21 Aug 2013 14:56:19 +0900 Message-id: <000101ce9e33$2bfcc6b0$83f65410$%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: Ac6eMyPhzzpCN316T5e8jUSvBQkLlg== Content-language: ko x-cr-hashedpuzzle: ER5y F4x7 GIbG Gi7a GvHV HJuE NODt TTDm T9zW UZxq Uq2S YkcP cE8b cvnd iT+8 qcLX; 4; YwBqAGIAQABsAGEAcAB0AG8AcAAuAG8AcgBnADsAagBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA7AGwAaQBuAHUAeAAtAG0AbQBjAEAAdgBnAGUAcgAuAGsAZQByAG4AZQBsAC4AbwByAGcAOwBzAG8AbgBpAGMALgB6AGgAYQBuAGcAQABhAG4AYQBsAG8AZwAuAGMAbwBtAA==; Sosha1_v1; 7; {BB440250-BE51-49C3-A40C-B672483269C6}; agBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA=; Wed, 21 Aug 2013 05:56:12 GMT; WwBQAEEAVABDAEgAIABSAEUAUwBFAE4ARABdACAAbQBtAGMAOgAgAG0AbQBjAF8AcwBwAGkAOgAgAHUAcwBlACAAcwBwAGkAXwBnAGUAdABfAGQAcgB2AGQAYQB0AGEAKAApACAAYQBuAGQAIABzAHAAaQBfAHMAZQB0AF8AZAByAHYAZABhAHQAYQAoACkA x-cr-puzzleid: {BB440250-BE51-49C3-A40C-B672483269C6} X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLIsWRmVeSWpSXmKPExsVy+t8zQ92uMJEgg62z2Cy2v97IZnF54SVW iyP/+xkt7mxtZnNg8Xh11dHj0JW1jB59W1YxenzeJBfAEsVlk5Kak1mWWqRvl8CVcWzhd5aC dTwVf1qDGxgncnUxcnJICJhIPJq/hw3CFpO4cG89kM3FISSwjFHi6ewdjDBF/V1voRLTGSWe H5rKDOH8YpT4Pu8BC0gVm4CaxJcvh9lBbBEBRYkt34+D2cwC2RJzO7+zgtjCAsESk67uArNZ BFQl1j56wQxi8wrYSty41c8IYQtK/Jh8jwWiV0ti/c7jTBC2vMTmNW+B6jmALlKXePRXF2KV nsS2c6/ZIEpEJPa9eMcIcpuEwBRWiV1r1zNDfGAqMe3/S6jEMXaJ7c/fsUEcISDxbfIhFoih shKbDkDVS0ocXHGDZQKjxCwkJ81CctIsJCfNQrJ7ASPLKkbR1ILkguKk9CJDveLE3OLSvHS9 5PzcTYyQqOzdwXj7gPUhxmSg9ROZpUST84FRnVcSb2hsZmRhamJqbGRuaUaasJI4r1qLdaCQ QHpiSWp2ampBalF8UWlOavEhRiYOTqkGxpT91S5F737wruJ2tjvqvS/PsOHe48szVpznvN3u vych52U1f13Wfobu/k1fLmiZB69f6vBL6rgGy62SjRv/mwXFz+MPSOa5qiOdsOBqlUifotQV O/s/M0WWperNc+qSc5/+Te8Ry7ylL6/6T46SZz0lePXolk2rPFdw/pX3LQtddJL7veX9UiWW 4oxEQy3mouJEACKboyngAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFKsWRmVeSWpSXmKPExsVy+t9jQd2uMJEgg1VTmSy2v97IZnF54SVW iyP/+xkt7mxtZnNg8Xh11dHj0JW1jB59W1YxenzeJBfAEtXAaJORmpiSWqSQmpecn5KZl26r 5B0c7xxvamZgqGtoaWGupJCXmJtqq+TiE6DrlpkDtFJJoSwxpxQoFJBYXKykb4dpQmiIm64F TGOErm9IEFyPkQEaSFjHmHFs4XeWgnU8FX9agxsYJ3J1MXJySAiYSPR3vWWDsMUkLtxbD2Rz cQgJTGeUeH5oKjOE84tR4vu8BywgVWwCahJfvhxmB7FFBBQltnw/DmYzC2RLzO38zgpiCwsE S0y6ugvMZhFQlVj76AUziM0rYCtx41Y/I4QtKPFj8j0WiF4tifU7jzNB2PISm9e8BarnALpI XeLRX12IVXoS2869ZoMoEZHY9+IdI8htEgJTWCV2rV3PDPGBqcS0/y8ZJzAKzUKyYhaSFbOQ rJiFZNYCRpZVjKKpBckFxUnpuYZ6xYm5xaV56XrJ+bmbGMEx/0xqB+PKBotDjAIcjEo8vBeU RYKEWBPLiitzDzFKcDArifDudwYK8aYkVlalFuXHF5XmpBYfYkwGhsBEZinR5HxgOsoriTc0 NjEzsjQyszAyMTcnTVhJnPdAq3WgkEB6YklqdmpqQWoRzBYmDk6pBkYpQT/unM1ZAk27Kywi O3p38VvdT67i2Vj2eu018UifR6s+15XsSC/avk807e6R/h8hZi5LpDa/cja2jkxZ8NL60w3h p0lvOX4dCjXvKW37mRbdf8RgAucl3fYLTRdOn/9RUZFn3B9eOt+tuG/Ni5sVryeHnrdMjnM8 FDjt+ktr9jVdxsX3nZVYijMSDbWYi4oTAYyEB5w9AwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. This is a cosmetic change in order to enhance the readability and make the code simpler. Signed-off-by: Jingoo Han Acked-by: Sonic Zhang --- drivers/mmc/host/mmc_spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index 74145d1..5bc7a90 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c @@ -1406,7 +1406,7 @@ static int mmc_spi_probe(struct spi_device *spi) host->powerup_msecs = 250; } - dev_set_drvdata(&spi->dev, mmc); + spi_set_drvdata(spi, mmc); /* preallocate dma buffers */ host->data = kmalloc(sizeof(*host->data), GFP_KERNEL); @@ -1477,7 +1477,7 @@ fail_glue_init: fail_nobuf1: mmc_free_host(mmc); mmc_spi_put_pdata(spi); - dev_set_drvdata(&spi->dev, NULL); + spi_set_drvdata(spi, NULL); nomem: kfree(ones); @@ -1487,7 +1487,7 @@ nomem: static int mmc_spi_remove(struct spi_device *spi) { - struct mmc_host *mmc = dev_get_drvdata(&spi->dev); + struct mmc_host *mmc = spi_get_drvdata(spi); struct mmc_spi_host *host; if (mmc) { @@ -1512,7 +1512,7 @@ static int mmc_spi_remove(struct spi_device *spi) spi->max_speed_hz = mmc->f_max; mmc_free_host(mmc); mmc_spi_put_pdata(spi); - dev_set_drvdata(&spi->dev, NULL); + spi_set_drvdata(spi, NULL); } return 0; }