Message ID | 20240827074857.2671808-2-xirui.zhang@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 EEC5BC5320E for <linux-arm-kernel@archiver.kernel.org>; Tue, 27 Aug 2024 07:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=posYKQbWWTEJWc9YhLSbmjzO2EaiJH/gcEE/yOXaY8k=; b=cj0QhCxPHh+Xps47SSPKKVyM7z dV9slBAsTeD5V2ypVfJep7KXlzoRAzjVfpYScwkIZkAWNdXU1vLh+IsRyFsNFgxywB0kRi9rkP1Fb F307Keipv3LhsC/3buMOGjyjrhBqKPLbS1aSIm6QNLWQWfjdXMJIlZQ2cmOlkOaGspXI3/YYKyJ5O bsD+HV+7zRNkfTwC51/JyCTb0TvXJbLNNSlOBe2mjVPIJdUVUybsw7TKLi+aVriTVdUMxWx8lYIAg dKZW9yUyCVTkdLWqcSMwK52tixQenYLOU0deuDm/tFM11MoMKf4uFOUDOc7BySg3iz8ZEeGu088dY NysAzurg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siqkc-0000000AEwf-21F3; Tue, 27 Aug 2024 07:36:26 +0000 Received: from mail-eastasiaazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c400::] helo=HK2PR02CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siqj1-0000000AEPa-1Piu for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 07:34:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xJw7rsEP6+fGIAeD9gb9PdcDuGg5cMhuurVN65R/n/8xi+y7Nbv5o+LU0wsaG1MXa1m1Kjo4kSrrMcYrH3dViqrzwgnM190CoC1qWNvs+S+rnPBJVQA/gKxWvnODgiRZRr2yDeNNd4dTK5N91AvwAkvP0xSFiF5cu6u43SQwHzpz8oXSFbmc2Cu/sVKBPv0jqjSA1bdJmY2eHwBg2LbHtBAYfKPnGz9UE1g7IjHZc4AG1keNBk2nIBPINFdVmByqziaCQIHu8gLuEIc4PjR+ZttCn5vH1aXB0RLY0Sl3PfwGV/A3Rod/uRZ3cSFhwzVfho/GkFkSE+bO3FvdMhnkBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=posYKQbWWTEJWc9YhLSbmjzO2EaiJH/gcEE/yOXaY8k=; b=M8N1JH/Vs/eUkPFu/ei0TzhkXsd1wnvseYZbRZ3lk9vKTU3i1rAcAZvNquSuUS4IgDgOma3piqVIU6Fzs13AfYnt/2zA+++jegOHNOdLZYG6tfe8/0l8Ao1gBrRhHt07kPoa8qQcu8nMYCLczEM1v3gs92FECukJOytnfZu1w3tcc1EEqY/SjK2jmgmJy7bvckKvhhfvnE7HVu2JESObAiSVwIFZpydvXJSRYEOVtOZ3CBhx4c/gNn+M8IN7A5/3tafd1tabKZXUe2e3Eg9FBmn3W/+cKebi0f3jMdEggnizCy7jkNbmFXeA4UBI57EVXRS97r6kXl6pSrIMzKKoFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=posYKQbWWTEJWc9YhLSbmjzO2EaiJH/gcEE/yOXaY8k=; b=GfKWJl/IXxJBOC2Sgftc/zk1rDmhiQXdLQKcYd+iCsjD6MWcXZB7+bCq/VpSkRyRRN8At+wup920ZsnlpTFpTR0ZkvElO6K9KzDYAOLKtu/vWRbq8qXjoXHrlxhvasU8nUi6u3ljMk1yY8pQnmnk8Cz3E+Ge3DsmcqazQXNKwadEZkr5o70U2KbXEB03GG/9tXnM40fWlBzSS8WfNNE+ZhI/L1g3dsMxPUU8syfe5+LqhOGl81Ujuw42S9bCVRM5KZOMxaS3LvrPI7dfJvLwMFTAjUS65dz4Oa+wvSfrdcxqhOFamkSZ3MFXFZmafEnacm+NCa9y/nRNTPWXaiSpJg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5178.apcprd06.prod.outlook.com (2603:1096:400:1f7::12) by SI6PR06MB7102.apcprd06.prod.outlook.com (2603:1096:4:244::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Tue, 27 Aug 2024 07:34:38 +0000 Received: from TYZPR06MB5178.apcprd06.prod.outlook.com ([fe80::f6de:c016:c33a:318]) by TYZPR06MB5178.apcprd06.prod.outlook.com ([fe80::f6de:c016:c33a:318%4]) with mapi id 15.20.7897.021; Tue, 27 Aug 2024 07:34:38 +0000 From: zhangxirui <xirui.zhang@vivo.com> To: Robert Richter <rric@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>, Jaehoon Chung <jh80.chung@samsung.com>, Nicolas Pitre <nico@fluxnic.net>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Adrian Hunter <adrian.hunter@intel.com>, Taichi Sugaya <sugaya.taichi@socionext.com>, Takao Orito <orito.takao@socionext.com>, Michal Simek <michal.simek@amd.com>, zhangxirui <xirui.zhang@vivo.com>, Bastien Curutchet <bastien.curutchet@bootlin.com>, Linus Walleij <linus.walleij@linaro.org>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/9] mmc: cavium-thunderx: Use devm_clk_get_enabled() helpers Date: Tue, 27 Aug 2024 01:48:39 -0600 Message-Id: <20240827074857.2671808-2-xirui.zhang@vivo.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240827074857.2671808-1-xirui.zhang@vivo.com> References: <20240827074857.2671808-1-xirui.zhang@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0005.apcprd02.prod.outlook.com (2603:1096:3:17::17) To TYZPR06MB5178.apcprd06.prod.outlook.com (2603:1096:400:1f7::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5178:EE_|SI6PR06MB7102:EE_ X-MS-Office365-Filtering-Correlation-Id: db6fe64f-abcd-4aa0-1ab5-08dcc66ab4c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|7416014|921020|38350700014|43062017; X-Microsoft-Antispam-Message-Info: hvoZwisLN6LEyZQcp0FCoU+BjFdM7Vm1FCfat7BF5bn3d+wdbIxtAe5g8pMq98YOwEn3IgBOr4YK69VIkKqIaaTsTlz8vtXEa/PkOgAIVUek4to/TnYVjGTP3z9kqLZVCEsa4u0aWaJ7TdzAmy6VH/1rOMEgGuPG3MyqyNmClC4boUqaGVQSQ+GlWU/J5gKuXDdPyUMvNQiAXr8bFFsRIMLU6SMbVkROQcuXXCuCraahJKFIQo17j6h7hPU9cKNqf6CYS/WGYT7TRf6SpSnQbixphq1u6Wae/d5cIM+bDgNJUsf2gw7QPNX9aPiqkXMgYRWZgCXI2iDryn4uBDGd4XcrRs14iJFnJm2wXQ3HZ+pFUNhkWDskfvwD3f4wEHLN/V0uQwMUYrSV++HrkVizrFUTGC9djqGbY0x+caXSlDk/6wyfl0ctLnnBvCtXtI5k8kJxARwhYWp9l67igsoj7wF62WhREivOnpScmm1C/hXFSnakvjylnyCgXJ2xsklffGDhuJ4vLokt/be+C72Vzfdv3zGoCszFv6T32+3yC5Lv19IffhmGWSDRv4eLEJg3j2ZS7TchM74OfqKHD5QYeM5kZxY/0as5TJgLS5nUKUssMMxcB7/Lbgsk2iyV4ElDGJ7bmyOT6jQ08jsdhQfxjkP9GBhhjqknJKIuvHyIRFplhs1bejvZnX1dwwgYAjXk9IDSlg9uPkopKYZxjfCNeYx8Nkwa9qniSvN4iZxrllpYMp7G/KrnhjIXh7ENkOtwARsG8RHGkk3N4Zl+7ZpWXLqbKWbK2dPcmj7usD9vRdFLQQwS9UXA1HoORAQbRQia7+CvfT8IokaViQY4CuW2zudV/lvVGYTXPsoaOffrzfX5lgZjo9fbdP01KFeXM9lx+K406gDFPzs5S2jHdV5oHs6HZ2XB0KKNY6QbXCzCQo5t0HHXWjDayQOjJf+SrOmf5GEhPsSdPipcaVZIbS7kG0LwJ3PWTQER6MJgq8Gb0pvQdePobAaJPT77xEYOq5eJNyb1N1Q7R83SMxJbA+Sb0d9JqIkEX2bMj4Z2BkiWmYIl1X6Jbcux7xZ7nCi7RYPFr5d+uMnRImt4lad+KzFGaOxrRriCcI9W2Q4Hsjwe5sQ1bed5OBBIfUYDVssfUh7aGSrOt26+09++yqmxq8cJj7kchVuNqG89qfHQKStO8hibg79dNTa8hccVS59mX0JI5tm+pc+5unzWCdTJsBB9dstkvTrn1FS+lz/MO/GDkM5XjqRIqc8iJzprQxRvK5BgBdbkbifXpjAqCEq5FE3M0TIzPGGcypSyRbMvRejKg4yAZHyILP2X3vaa6/6T4AJ3X49gt9dICYjGKzjYBpK38MqYAhy2Wn75VBr4iCjb/TAsdilfYYnjbxuwohSkvQqM8GWdC5ehP67B8sMvA3+3nWCn6sVUa/aSMW6dR94c0X9x7xjBIlLNyAmKjS6bg8jB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5178.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(52116014)(7416014)(921020)(38350700014)(43062017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0uhIYZQmrjmAyUpQp4EQqFngCP3R6nRO3EnsVhQsNG8j/nL/jJTIawSuEQxipmDLmqB554+nhxpyeXVy/5w6Jt74+RziaW5J8xHsnVAJvkjaQHvfPkrblKIioDmxHdeiQFsAddtaU4SoDjXjZE8e6lkp9DD3bgw8h2poSawF78XlJq4OZLXYpbnMZ466HycRU0PwaiWvbNxo8GzgwEELEg9SU58rYRv2502BBIdcYT/npNDvYFxnYXwXmbehEfrb3VgztZYra/f3KUuHSZ7OYPL/cVAre/awtvGRj5piycZRrPR/wkLVwkeiukvnn4QIb6zSLuEWb5Ley/bCusVEuY7v8A9AyvOonzEelNILfXe1yDJ2AqKobuuljY6jczdBia0KdPzYAxQ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IXarYiwr3VZGPu8jT/VXJ+eW7QcNCcmxiGfavFdJTAsmnXSZx5gXVgnGWV/DkhbirYbmW7JKBIIkOcvWOd8p67pKk69yVCfVD2Yw/syK3aSg8l2s+EjzoPMxJJKRZjO1u5y0GgxZh9 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: db6fe64f-abcd-4aa0-1ab5-08dcc66ab4c5 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5178.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 07:34:38.3230 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k5uHeLLH5B6dJX9KL2isJTSSs4tdZP/E+Fs+L0lhnaGKbE/NwJhdRB7NXdBIWxiU50jh8RQBGqlWgFsB+3KQGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI6PR06MB7102 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_003447_402723_A5791071 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
mmc: convert to devm_clk_get_enabled() API
|
expand
|
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c index 2e2ff984f0b3..8111e24c52b5 100644 --- a/drivers/mmc/host/cavium-thunderx.c +++ b/drivers/mmc/host/cavium-thunderx.c @@ -88,15 +88,12 @@ static int thunder_mmc_probe(struct pci_dev *pdev, host->reg_off = 0x2000; host->reg_off_dma = 0x160; - host->clk = devm_clk_get(dev, NULL); + host->clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(host->clk)) { ret = PTR_ERR(host->clk); goto error; } - ret = clk_prepare_enable(host->clk); - if (ret) - goto error; host->sys_freq = clk_get_rate(host->clk); spin_lock_init(&host->irq_handler_lock); @@ -163,7 +160,6 @@ static int thunder_mmc_probe(struct pci_dev *pdev, put_device(&host->slot_pdev[i]->dev); } } - clk_disable_unprepare(host->clk); pci_release_regions(pdev); return ret; } @@ -182,7 +178,6 @@ static void thunder_mmc_remove(struct pci_dev *pdev) dma_cfg &= ~MIO_EMM_DMA_CFG_EN; writeq(dma_cfg, host->dma_base + MIO_EMM_DMA_CFG(host)); - clk_disable_unprepare(host->clk); pci_release_regions(pdev); }
Use devm_clk_get_enabled() to simplify code and avoids the calls to clk_disable_unprepare(). Signed-off-by: zhangxirui <xirui.zhang@vivo.com> --- drivers/mmc/host/cavium-thunderx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)