From patchwork Mon Jan 5 07:03:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5565271 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F00129F2ED for ; Mon, 5 Jan 2015 07:04:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A8A620145 for ; Mon, 5 Jan 2015 07:04:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30F6420035 for ; Mon, 5 Jan 2015 07:04:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753136AbbAEHEC (ORCPT ); Mon, 5 Jan 2015 02:04:02 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:21433 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753036AbbAEHEB (ORCPT ); Mon, 5 Jan 2015 02:04:01 -0500 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 05 Jan 2015 16:04:00 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 0F25948C01; Mon, 5 Jan 2015 16:04:00 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 13232480A4; Mon, 5 Jan 2015 16:04:00 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 0DFB5480A3; Mon, 5 Jan 2015 16:04:00 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id SAC03150; Mon, 5 Jan 2015 16:04:00 +0900 X-IronPort-AV: E=Sophos;i="5.07,698,1413212400"; d="scan'208";a="178002893" Received: from mail-sg1lp0089.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.89]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 05 Jan 2015 16:03:59 +0900 Received: from HKXPR06MB165.apcprd06.prod.outlook.com (10.242.124.16) by HKXPR06MB069.apcprd06.prod.outlook.com (10.242.122.11) with Microsoft SMTP Server (TLS) id 15.1.49.12; Mon, 5 Jan 2015 07:03:58 +0000 Received: from remon.renesas.com (211.11.155.132) by HKXPR06MB165.apcprd06.prod.outlook.com (10.242.124.16) with Microsoft SMTP Server (TLS) id 15.1.49.12; Mon, 5 Jan 2015 07:03:56 +0000 Message-ID: <87oaqdoghr.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 8/9] mmc: sh_mobile_sdhi: remove .init/.cleanup User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Ulf Hansson , Chris Ball , Simon CC: Linux-SH , linux-mmc , Kuninori Morimoto In-Reply-To: <87zj9xogln.wl%kuninori.morimoto.gx@renesas.com> References: <87zj9xogln.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Mon, 5 Jan 2015 07:03:56 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: HKXPR02CA0057.apcprd02.prod.outlook.com (25.161.48.42) To HKXPR06MB165.apcprd06.prod.outlook.com (10.242.124.16) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-DmarcAction: None X-Microsoft-Antispam: UriScan:;UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:HKXPR06MB165; X-Forefront-PRVS: 0447DB1C71 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(97736003)(2950100001)(68736005)(106356001)(81156004)(23726002)(107046002)(77156002)(62966003)(105586002)(36756003)(92566001)(46406003)(77096005)(229853001)(120916001)(53416004)(122386002)(66066001)(64706001)(42186005)(19580405001)(19580395003)(69596002)(87976001)(33646002)(47776003)(46102003)(4396001)(40100003)(20776003)(76176999)(54356999)(50986999)(86362001)(21056001)(99396003)(101416001)(83506001)(31966008)(50466002); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB165; H:remon.renesas.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2015 07:03:56.7506 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB165 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB069; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:HKXPR06MB069; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB069; X-OriginatorOrg: renesas.com Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Kuninori Morimoto No one is using .init/.cleanup callback function. Let's remove these. Signed-off-by: Kuninori Morimoto --- drivers/mmc/host/sh_mobile_sdhi.c | 26 +------------------------- include/linux/mmc/sh_mobile_sdhi.h | 15 --------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index f8268b7..eae229f 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -156,15 +156,6 @@ static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card, return blk_size; } -static void sh_mobile_sdhi_cd_wakeup(const struct platform_device *pdev) -{ - mmc_detect_change(platform_get_drvdata(pdev), msecs_to_jiffies(100)); -} - -static const struct sh_mobile_sdhi_ops sdhi_ops = { - .cd_wakeup = sh_mobile_sdhi_cd_wakeup, -}; - static int sh_mobile_sdhi_probe(struct platform_device *pdev) { const struct of_device_id *of_id = @@ -192,19 +183,11 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) mmc_data = &priv->mmc_data; dma_priv = &priv->dma_priv; - if (p) { - if (p->init) { - ret = p->init(pdev, &sdhi_ops); - if (ret) - return ret; - } - } - priv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(priv->clk)) { ret = PTR_ERR(priv->clk); dev_err(&pdev->dev, "cannot get clock: %d\n", ret); - goto eclkget; + goto eprobe; } host = tmio_mmc_host_alloc(pdev); @@ -357,9 +340,6 @@ eirq: efree: tmio_mmc_host_free(host); eprobe: -eclkget: - if (p && p->cleanup) - p->cleanup(pdev); return ret; } @@ -367,13 +347,9 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct tmio_mmc_host *host = mmc_priv(mmc); - struct sh_mobile_sdhi_info *p = pdev->dev.platform_data; tmio_mmc_host_remove(host); - if (p && p->cleanup) - p->cleanup(pdev); - return 0; } diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h index 68927ae..da77e5e20 100644 --- a/include/linux/mmc/sh_mobile_sdhi.h +++ b/include/linux/mmc/sh_mobile_sdhi.h @@ -3,20 +3,10 @@ #include -struct platform_device; - #define SH_MOBILE_SDHI_IRQ_CARD_DETECT "card_detect" #define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard" #define SH_MOBILE_SDHI_IRQ_SDIO "sdio" -/** - * struct sh_mobile_sdhi_ops - SDHI driver callbacks - * @cd_wakeup: trigger a card-detection run - */ -struct sh_mobile_sdhi_ops { - void (*cd_wakeup)(const struct platform_device *pdev); -}; - struct sh_mobile_sdhi_info { int dma_slave_tx; int dma_slave_rx; @@ -25,11 +15,6 @@ struct sh_mobile_sdhi_info { unsigned long tmio_caps2; u32 tmio_ocr_mask; /* available MMC voltages */ unsigned int cd_gpio; - - /* callbacks for board specific setup code */ - int (*init)(struct platform_device *pdev, - const struct sh_mobile_sdhi_ops *ops); - void (*cleanup)(struct platform_device *pdev); }; #endif /* LINUX_MMC_SH_MOBILE_SDHI_H */