From patchwork Wed Apr 17 16:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13633655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA6E7C001CC for ; Wed, 17 Apr 2024 16:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6oc3JAmoJyBjFl3jKfqK33bztF29psY0/smH16Y7UCU=; b=WZeP2SLC9Z5fVo AMx+B5nkMdY1qS2Jao2YhnWvoKpbeZPCtg2cldX7xIY9RrsmzwuFbSRSc9diSLNrHcLk1msJbF+oP Oy1h4LNslrRDB+CpTDsvMjJodoSz0MTzrfpnbJeidH1VPLSRZv0emyDvhUq303lw7spzZ/3rB0vnr MRPpozCi9fkqI3MdAh5UWDlvm4ffyNSH8tF7DvbUKXpycBwQjzXx67wIbksCn2aAPgKEWw4e86T84 kp2gQvgW+sXMgD0JArwRTrZAfWRFCq5jsLcnqIJCa1PVaOV/iZrzT8H13z9OLea58CofvlqJmFezU /lKLmdJ28c9nHwtNwP2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx8b8-0000000Gtvo-0qQe; Wed, 17 Apr 2024 16:57:26 +0000 Received: from mgamail.intel.com ([192.198.163.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx8b0-0000000GtsS-0ZDw for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 16:57:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713373038; x=1744909038; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EY0oW8gWzFx+UyQ5mI7eQESReZJaeFrBusZVAd3sm0g=; b=XvWzwf5I9K4/KN9xVy0nLaCVDKtQM+5grCyoMPoCTToi39Oc9vCztft/ DrYMEWm1Nrw1XT4Ivnb4GHHVwPkqA/AQES+V9LYAAhQdiwQBSF87WFFn4 ygazXgy9YkWGL2OTZWUa8+1K6qBU9gCpn1MH2FQ1kEk6RJmElpNCFYxeP nKb3F4IzU+3Tmw45XS0q1rHA20NixlCHS8euPH1AaUouXg4dnvTKH2UsJ nRQoNJHi9AdCch6s7Y+jMPYX8zXz8wux2gr2oFUKw30k2qf27guZUwwtU QOOQ1DyO0QCrHF3I6mbvEXYT+vg9eGJRwQzKuc6JcZdCq09oV60OYgok8 w==; X-CSE-ConnectionGUID: ikuGwwiRTuSIINbvV1Z6Eg== X-CSE-MsgGUID: O4DY/8qIRv+jxLuHtRK/hw== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="8737011" X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="8737011" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2024 09:57:15 -0700 X-CSE-ConnectionGUID: U7LXLfYBRfqoKFFlXjA0RA== X-CSE-MsgGUID: KuzNvTAhTWiD4ahfD3nqEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,209,1708416000"; d="scan'208";a="22571635" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa010.jf.intel.com with ESMTP; 17 Apr 2024 09:57:13 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 95DCA68; Wed, 17 Apr 2024 19:57:11 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/5] mmc: atmel-mci: Get rid of platform data leftovers Date: Wed, 17 Apr 2024 19:55:13 +0300 Message-ID: <20240417165708.2965612-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240417165708.2965612-1-andriy.shevchenko@linux.intel.com> References: <20240417165708.2965612-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_095718_325935_3FD095D9 X-CRM114-Status: GOOD ( 16.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aubin Constans , Ulf Hansson , Alexandre Belloni , Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The commit d2c6d518c21d ("mmc: atmel-mci: move atmel MCI header file") made sure that there is no in-kernel user of the platform data. But at the same time it hadn't removed the code around that data structure. Finish the job here and remove a dead code. Fixes: d2c6d518c21d ("mmc: atmel-mci: move atmel MCI header file") Signed-off-by: Andy Shevchenko --- drivers/mmc/host/atmel-mci.c | 43 +++++------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index dba826db739a..87c2855f64c2 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -226,13 +226,9 @@ struct mci_slot_pdata { /** * struct mci_platform_data - board-specific MMC/SDcard configuration - * @dma_slave: DMA slave interface to use in data transfers. - * @dma_filter: Filtering function to filter the DMA channel * @slot: Per-slot configuration data. */ struct mci_platform_data { - void *dma_slave; - dma_filter_fn dma_filter; struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS]; }; @@ -626,7 +622,6 @@ static void atmci_init_debugfs(struct atmel_mci_slot *slot) &host->completed_events); } -#if defined(CONFIG_OF) static const struct of_device_id atmci_dt_ids[] = { { .compatible = "atmel,hsmci" }, { /* sentinel */ } @@ -700,13 +695,6 @@ atmci_of_init(struct platform_device *pdev) return pdata; } -#else /* CONFIG_OF */ -static inline struct mci_platform_data* -atmci_of_init(struct platform_device *dev) -{ - return ERR_PTR(-EINVAL); -} -#endif static inline unsigned int atmci_get_version(struct atmel_mci *host) { @@ -2388,23 +2376,6 @@ static void atmci_cleanup_slot(struct atmel_mci_slot *slot, static int atmci_configure_dma(struct atmel_mci *host) { host->dma.chan = dma_request_chan(&host->pdev->dev, "rxtx"); - - if (PTR_ERR(host->dma.chan) == -ENODEV) { - struct mci_platform_data *pdata = host->pdev->dev.platform_data; - dma_cap_mask_t mask; - - if (!pdata || !pdata->dma_filter) - return -ENODEV; - - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - - host->dma.chan = dma_request_channel(mask, pdata->dma_filter, - pdata->dma_slave); - if (!host->dma.chan) - host->dma.chan = ERR_PTR(-ENODEV); - } - if (IS_ERR(host->dma.chan)) return PTR_ERR(host->dma.chan); @@ -2492,13 +2463,11 @@ static int atmci_probe(struct platform_device *pdev) regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!regs) return -ENXIO; - pdata = pdev->dev.platform_data; - if (!pdata) { - pdata = atmci_of_init(pdev); - if (IS_ERR(pdata)) { - dev_err(&pdev->dev, "platform data not available\n"); - return PTR_ERR(pdata); - } + + pdata = atmci_of_init(pdev); + if (IS_ERR(pdata)) { + dev_err(&pdev->dev, "platform data not available\n"); + return PTR_ERR(pdata); } irq = platform_get_irq(pdev, 0); @@ -2701,7 +2670,7 @@ static struct platform_driver atmci_driver = { .driver = { .name = "atmel_mci", .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .of_match_table = of_match_ptr(atmci_dt_ids), + .of_match_table = atmci_dt_ids, .pm = &atmci_dev_pm_ops, }, };