Message ID | 20240827074857.2671808-3-xirui.zhang@vivo.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11010031.outbound.protection.outlook.com [52.101.128.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 889161448E0 for <imx@lists.linux.dev>; Tue, 27 Aug 2024 07:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.31 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724744096; cv=fail; b=mORmnwSnHOpogTOBOnNmOgJtWWvf4U4QTOS6YU+jjeL6PyqG2j13/ZFwvaDCBW+X5IM7CaqTLfke9ObH++yjbLUuanLV9c4mmWdCurhDGlaS0Lgkzmm7LOcp5ONuW+/Tm9WIhkZUm1XxSGPfux36haedsOLqxHzTXrTUXIxxZGA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724744096; c=relaxed/simple; bh=CatR6yJF9yjGW1nbrhW0FHlxdYQQzsIJNzpjHb5uN1Q=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mAUlHGxC0AbevcStJC4vkK4RwVrRib7ysaMtolCd2vnQK/aoKb1cpYqkeHUu+rr5L0gzS7XDlDOXqTJYfDwRGf7S+oF1wI0E2sEAaiZsYWucWybwY8fxih6Mj3m2bu3jNTyH90fSnNkgN9EgIjjNaYW+tZB0PK5syd8OLtcAIfw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=XRoO7kWK; arc=fail smtp.client-ip=52.101.128.31 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="XRoO7kWK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HoATgHY9IIsrqQlzqUWFnIk9khyVTf4UgH9xkXqg/aJYhokL4K1+QeTkCXXNtmsM9K2cyUCENnGKfzWFyhc2OobswRFFem5fZ/AvG6oAClzKok9q9KVycWeovS0W3YI+o0X/hb/9xOHg044zDfhfQt39uRr1oXkqNzlXXOBzSvYcYnnRExv+t6yEC15vAyG4nNCgWSBA5enaKJmy+MzVBlQp03ZfJj2ynivuv5ZxorOpcEdEXfwSzuxE1I8SfIWx6pcQsJNLpbEac2Icmv2zWFTEO6uvm/IdTc2sKO1VGR2tGNbj0NDrvaKxkRHQvs67n8m1DtKDW27JWPfNEpQOmQ== 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=VQ+XYxeMXRYeovd4iwShM7nU+RCgLZqQthYnaofweqc=; b=Z2and/EA5oOLTUmVQfgiZv8e3lGplQdeaeLCP9VLbIQiJcp/GKPrmH1JYQCMLcKHMjNcUy4l5FlZdtvdVbhqy4JtmU/Iz6e2WwDJhhoIHluWsvjZ+GTg8QG7hsVSz/WF8qUjSFGBxJeWL5srBvn8K7kd3N/fTP0QdyWmtGO95ih2RROS/UyOcK5S4s0QY6YAt88cscgxa2QlCH3MRCVzi87sTrkRNEU/Xgu4nx85G92fGSgj4cKjEpReqAAwN2u3q+oZL57x6iKY4VJt2lvg4mb3Ug3ImO4tU5GsRiV8AH53hL/fYkSOjTDVMz5H6NtIX4uJMV7Dd9qoC7SuXlVQNg== 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=VQ+XYxeMXRYeovd4iwShM7nU+RCgLZqQthYnaofweqc=; b=XRoO7kWKVeYnbOW70GDlUNOzbCPqEn9l0I/dgN3CN1bww2Zn9LZoVrqevU5exzbPESI80KCPWd1BPi91E19iYYaCAS4bJzqLI4ZjDkYvr8aYCYlI1w+dH9G9sT+dUHUKBxoeLvod0iOest1U0JO2M57b6SFlwA+47XBlzGhDS58y/2B5WfMUxmdFPyC01a15FEKVKJ1fbbcDALkDIVTu+lb75RGYc2ycMxbTtXMpdD8KXrGg/Wgc8oTrAA+e+DU4jBFGIzkp9r4/9fgHHRqTYM0HLiKfdRjPV5H89iUDyB8/hu2GBQSz8TgDacdqfkVFWqxLw0KHdSPUKQfxs9skog== 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:51 +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:51 +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>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/9] mmc: davinci_mmc: Use devm_clk_get_enabled() helpers Date: Tue, 27 Aug 2024 01:48:40 -0600 Message-Id: <20240827074857.2671808-3-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) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5178:EE_|SI6PR06MB7102:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a58f75a-721a-4176-9bd2-08dcc66abc8a 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: SqApWg+fTfXseJ9szGQgk2iLgaT8wVoOaJj5a2j2XMyvubCX0YPWK0IslnvOs/LmUKBJeeGZ9DBpQypsr/fxGg2Q1x2k9ZcrdjKyyAy5p7cVoeYNg82I6loI3i3IHf7uOZFpxT6VCLmzvbpNXWOsQ4ShVq8TmY4m7mo4T4jsCDou1T31RnBE15l9fOygdBG52aLQsRuz6xHI1/ju9vizB5K3QxWJvIeL9vEIgl3DPX4mMHY6F4zvYmCWlK2VdraAlGBQqnmM6WDjWCG4jXLPsi69V5Whf571PgIECpOeyFzv3IG98xitQwRUHRo0cZN088eWnQUD884iAm5Xla4wAxiIY4HawfevR1Z0WEpUXgo0wpOS9jXASqxbwpB9QDuCnIWre44J+juDYzKEHEBh83rwZsu9T7M/lQ/dneL+fl4/6q9Dx9SIXR/RjUxUUy5x/OFmj/iFBmfc+Qdf6D7yAO0g9e6Wsnhy1sgrFzR+GKoBgz7i+UHizRA0SlU1Ym4J3IwQIWYszchZsSyG8LGY1B4lEsSgi8aGyzpFuq0yA3A4lyNNp4CwLtryFJ/8JNyBoSabXcggZy5SpFyuMUcJCECy2ypTSPqDF3Snt8y8L9sB4zC0edWcLwPCnlU9Jw6q5+8lRKzDyegym0Qd7qQjW65u37lVLpdH40qDJr0sXxvqZa63UA953i1U2Oh/wnnoTG9qlHI5kgBeOuOu5dei3v2TUPpp5W/+Jdh+PVWzeMI+agf+xnSPgXoV624cSR4JSInH3EnXLDrjx1Y+YZUQG9hVxjAe9zptaeA2U4aqdhbInySgUoUjqquTqetL4I7i5kIMCHVHWwYm6+4PZ20DUTJC27VZIUxSqWpzPmlxqtXmpuYwTuIbuN/GCMp8xiRXq9OksBTFQDcGoPmz5JpAm5ugyYlthE0HbWBpb/1wxgU4GQ6bWWRakQjwljhw9cuWnGO+BVqCF1NfIqL9aSEmBXIJfOlPRmBPAUKBnrTZ6tqSuWiPG9LY11H08UHZrHXmjLASj4YyoCYAeABkNeVkXHHFvsAptWAqah+OoIKvV08mIz1LKXkh3sNLCRXWMRYpolMWWUD1OKbQ//6kBEosYoNorZBHKlU6qmfqCZ3HmTX+Dbp93iJmc6cRQk+n0/kI9QYCS0OATTah489r3HeZqyBrTqHhEvYpFCLbmHTKVcDx41hrSH/QWQqoAh17g9bRmDmBk9wpdhY+7z2AIQuli5BeMqwkEe5470w/C9M2FzUYC1VJr9iaXPF2g5OHAizPsNTIgMw++eaNg9avFwno5S3XTUrON6wyEY7hsb4hnEFjZzHOHiG6eoaJnCjR5WLqvrEuPl1sahNGzR1EFxMfJO2uLgcdOqNEkoI35fbKGQ4AzSg03YEWIuS9qO2BwR78PglJ+RJseCAVq/x4RjMvDX0CXj3fpZErfQ0eQ1z6gAy6opOEafFh57+nA/7SPtkl 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: nmbKQYW+Vn7EndXQD0zXb/NAqKJvvmgLtB77JsEjuTU6Bk/rdt5PfQLtar7Ul7r0mDed9kuIjQfeE1EOmr3U9o8EU2DLMClIQ/JGlZwFve+6MuDApgdrfbB7pNdouD/xxFxkO9zkrxSw5TRg92wGWfSFpmQppqSZcLeTPDRXQk6aoaC5nR9AtgsOMm+U30f/Qe0TLKrhU1iJyiKoFiLfUnfdjWO7hUAQJIxewjRwxGwwChCpYYmNtZLrupmPu2HJsLoCEarr3wQ4OSyh20CcmDYsb+AvE4DUnqy0IksZ+L2EL/xgsVK/Fx2auBlDCIg63zDtvEQ325Bv1/5z99DVfKxJ9ewpMTK6Tg1s0fNi9DZvSWu8eyHS22+ze4s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hvnGJMj0kVbKExseo1nfXEy0HSZEYc09o+s7F4eIUqQg8RRNrAQwcJrLV36OVE9DQMbF3jNXgCcceVgJ1vOJyW5KeDWlQozUaqHnZZDOV+joabs2cGo6qh2Oa/CY5u05Ryf4sLkzfXIbQVUnaqw7s X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a58f75a-721a-4176-9bd2-08dcc66abc8a 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:51.2993 (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: eyHwD8Z5V5pzbNFA41IKGNOW0Fyc63Z61WMutMPqufpTfIebptYcKzEP2DJw+EdYCp/0UASczJMFTET79wnmGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI6PR06MB7102 |
Series |
mmc: convert to devm_clk_get_enabled() API
|
expand
|
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 9cbde800685d..3e71565285c3 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1218,14 +1218,11 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) goto ioremap_fail; } - host->clk = devm_clk_get(&pdev->dev, NULL); + host->clk = devm_clk_get_enabled(&pdev->dev, NULL); if (IS_ERR(host->clk)) { ret = PTR_ERR(host->clk); goto clk_get_fail; } - ret = clk_prepare_enable(host->clk); - if (ret) - goto clk_prepare_enable_fail; host->mmc_input_clk = clk_get_rate(host->clk); @@ -1336,8 +1333,6 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) davinci_release_dma_channels(host); parse_fail: dma_probe_defer: - clk_disable_unprepare(host->clk); -clk_prepare_enable_fail: clk_get_fail: ioremap_fail: mmc_free_host(mmc); @@ -1352,7 +1347,6 @@ static void davinci_mmcsd_remove(struct platform_device *pdev) mmc_remove_host(host->mmc); mmc_davinci_cpufreq_deregister(host); davinci_release_dma_channels(host); - clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); }
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/davinci_mmc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)