From patchwork Sat Apr 6 06:39: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: 2400931 Return-Path: X-Original-To: patchwork-linux-mmc@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 338E2DFB7B for ; Sat, 6 Apr 2013 06:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932661Ab3DFGjy (ORCPT ); Sat, 6 Apr 2013 02:39:54 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:27086 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754821Ab3DFGjx (ORCPT ); Sat, 6 Apr 2013 02:39:53 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKT008XPMIG0E00@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Sat, 06 Apr 2013 15:39:52 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.50]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id F2.15.05174.833CF515; Sat, 06 Apr 2013 15:39:52 +0900 (KST) X-AuditID: cbfee68f-b7f4a6d000001436-83-515fc3380e06 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id FC.F1.13494.833CF515; Sat, 06 Apr 2013 15:39:52 +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 <0MKT006UAMIGT910@mmp1.samsung.com>; Sat, 06 Apr 2013 15:39:52 +0900 (KST) From: Jingoo Han To: 'Chris Ball' Cc: linux-mmc@vger.kernel.org, 'Jingoo Han' Subject: [PATCH] mmc: mmc_spi: use spi_get_drvdata() and spi_set_drvdata() Date: Sat, 06 Apr 2013 15:39:52 +0900 Message-id: <001301ce3291$8ae3e180$a0aba480$%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: Ac4ykYeimL05ThWKThKDYNX/toN6EQ== Content-language: ko x-cr-hashedpuzzle: EWsQ HoTC Izsb KzDH Ne6t OJlN PtuN Qr8L R3uo Si1/ StVY YPOi ZT30 aPTa hLwq hmS6; 3; YwBqAGIAQABsAGEAcAB0AG8AcAAuAG8AcgBnADsAagBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA7AGwAaQBuAHUAeAAtAG0AbQBjAEAAdgBnAGUAcgAuAGsAZQByAG4AZQBsAC4AbwByAGcA; Sosha1_v1; 7; {7F40E3AC-C5FA-4085-9185-F360C9A9E80F}; agBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA=; Sat, 06 Apr 2013 06:39:46 GMT; WwBQAEEAVABDAEgAXQAgAG0AbQBjADoAIABtAG0AYwBfAHMAcABpADoAIAB1AHMAZQAgAHMAcABpAF8AZwBlAHQAXwBkAHIAdgBkAGEAdABhACgAKQAgAGEAbgBkACAAcwBwAGkAXwBzAGUAdABfAGQAcgB2AGQAYQB0AGEAKAApAA== x-cr-puzzleid: {7F40E3AC-C5FA-4085-9185-F360C9A9E80F} X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsVy+t8zI12Lw/GBBt+PyFpsf72RzeLywkus Fkf+9zM6MHscurKW0aNvyypGj8+b5AKYo7hsUlJzMstSi/TtErgyurd9YCm4wl2xormbuYHx BGcXIyeHhICJxNTOnUwQtpjEhXvr2boYuTiEBJYxSjybe40J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aQ2yQEjrBIzJzZBPWBqcSLL59ZJzAKzUKyYhaSFbOQrJiFZNYCRpZV jKKpBckFxUnpuUZ6xYm5xaV56XrJ+bmbGMEx/kx6B+OqBotDjAIcjEo8vBa34wKFWBPLiitz DzFKcDArifDKPgcK8aYkVlalFuXHF5XmpBYfYkwGhsBEZinR5Hxg+skriTc0NjEzsjQyszAy MTcnTVhJnPdgq3WgkEB6YklqdmpqQWoRzBYmDk6pBkavheYzb/cz5W5K1krZy5/wyueUdJ6e cOTSdI9X9iw1lZ+WHFvB9UZD1EBS2mLFnRfPy1v25cgX17N9vR/tvrJx6uIfn3W4rTZdtwne sF7niZCEVsw6+2wzr2352pn1M6SSzmyp93h7YPfcjBdhHbsjrv5mvX/w+52Y01XKv/7bqc3Z xyO3qlSJpTgj0VCLuag4EQD4AJdiNQMAAA== 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 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/mmc/host/mmc_spi.c | 8 ++++---- 1 files 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; }