From patchwork Thu Jan 19 07:36:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 45625 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp193188wrn; Wed, 18 Jan 2023 23:40:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXtPaUBaFo6DE0l7OjGBW34MdpNwBG6oRydlwGPecWW0FjOOaepV8gZ3fpyilDMR6ubfSxJX X-Received: by 2002:a62:1751:0:b0:56b:3758:a2d9 with SMTP id 78-20020a621751000000b0056b3758a2d9mr10514779pfx.21.1674114037500; Wed, 18 Jan 2023 23:40:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674114037; cv=none; d=google.com; s=arc-20160816; b=DOgMOsoHGPRnLJvj9V5nsWuTpDVL0nqGi8gHjfSDChrjpuZqK9SgNUl+l/tlm8ctl6 8efz4zKHtA6hg92U1BfSE9B5kNHeTX1Hj3T6LBuzM5elUpovzzQLSWeRFDzBlvQ6ocKs urb7dUAPUfF7yyI0z50idByPUk7jdJ0hBwsA0Y8YDYAnwkjfnIgbabyoCGaVlyZJnPcU xL4AdGeWpmE0gH3Df+gE93z5KheCjwjAk2O1QqLZ0fBbK2h99j/umCjxXnlhXaLXg0JA e7JNQraPeWmDC3L/kgbXEuPsiZb6tE9XPHW7N3UToMtJYDZwRLJgb1OqRnVlCq2Dcud3 TEhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=dFHQ+ZkmtTqH4jrGEXo/Q8WmrsEg4/K+03VytE2ZBZo=; b=UbaG3gDBx/S+sxfDeRDzr0D7cTDjtsypLGjum4Y3ilCKP4bI4NMmH0L0aKCz9pC2xH XzsU4R5IcJbLmYgIzz6EdQZ6ySVGQnom1zR9abFjhlF+Yu3lbtZ/wWDLZairUpcrUYVz 9EjJSsRYBYMyd/nyt8jFhcpucTxJXWNF9sn6qt+C7PcfXFkT9PR8pYCfFLFD2yqO5HKx 1sRGVnuDfwsOFPXtYiKrFnevCyLMBinfpCm1ckBQJgTQj1VT3ieIHTimipQrQVScV5vu OKPJJPYxH8arowFPID8i1tGw2x5Mm1+pmvQfwf/xe9lpWuRTasKtot1GdDrou8DAYDxH p16g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv13-20020a056a00414d00b0057a7415ab1bsi13720977pfb.69.2023.01.18.23.40.25; Wed, 18 Jan 2023 23:40:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjASHhG (ORCPT + 99 others); Thu, 19 Jan 2023 02:37:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjASHhE (ORCPT ); Thu, 19 Jan 2023 02:37:04 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55EAADB; Wed, 18 Jan 2023 23:37:01 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NyDwW38z3z6FK2Q; Thu, 19 Jan 2023 15:36:59 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl1.zte.com.cn with SMTP id 30J7ak41021725; Thu, 19 Jan 2023 15:36:47 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Thu, 19 Jan 2023 15:36:49 +0800 (CST) Date: Thu, 19 Jan 2023 15:36:49 +0800 (CST) X-Zmail-TransId: 2af963c8f31135184eee X-Mailer: Zmail v1.0 Message-ID: <202301191536493046780@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_crypto=3A_aspeed_-_Use_devm=5Fplat?= =?utf-8?q?form=5Fget=5Fand=5Fioremap=5Fresource=28=29?= X-MAIL: mse-fl1.zte.com.cn 30J7ak41021725 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63C8F31B.000 by FangMail milter! X-FangMail-Envelope: 1674113819/4NyDwW38z3z6FK2Q/63C8F31B.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63C8F31B.000/4NyDwW38z3z6FK2Q X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755435800761169441?= X-GMAIL-MSGID: =?utf-8?q?1755435800761169441?= From: ye xingchen Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen --- drivers/crypto/aspeed/aspeed-hace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/crypto/aspeed/aspeed-hace.c b/drivers/crypto/aspeed/aspeed-hace.c index 656cb92c8bb6..d2871e1de9c2 100644 --- a/drivers/crypto/aspeed/aspeed-hace.c +++ b/drivers/crypto/aspeed/aspeed-hace.c @@ -99,7 +99,6 @@ static int aspeed_hace_probe(struct platform_device *pdev) const struct of_device_id *hace_dev_id; struct aspeed_engine_hash *hash_engine; struct aspeed_hace_dev *hace_dev; - struct resource *res; int rc; hace_dev = devm_kzalloc(&pdev->dev, sizeof(struct aspeed_hace_dev), @@ -118,11 +117,9 @@ static int aspeed_hace_probe(struct platform_device *pdev) hash_engine = &hace_dev->hash_engine; crypto_engine = &hace_dev->crypto_engine; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - platform_set_drvdata(pdev, hace_dev); - hace_dev->regs = devm_ioremap_resource(&pdev->dev, res); + hace_dev->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(hace_dev->regs)) return PTR_ERR(hace_dev->regs);