From patchwork Mon Oct 17 20:01:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13009432 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8A44C433FE for ; Mon, 17 Oct 2022 20:02:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbiJQUCF (ORCPT ); Mon, 17 Oct 2022 16:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231132AbiJQUB4 (ORCPT ); Mon, 17 Oct 2022 16:01:56 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9D78275EE for ; Mon, 17 Oct 2022 13:01:52 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okWJ1-0007p7-J3; Mon, 17 Oct 2022 22:01:47 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1okWJ0-0028XE-6d; Mon, 17 Oct 2022 22:01:46 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1okWIz-008db7-37; Mon, 17 Oct 2022 22:01:45 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Kamal Dasu , Broadcom internal kernel review list , Mark Brown , Florian Fainelli , Ray Jui , Scott Branden Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH] spi: bcm-qspi: Make bcm_qspi_remove() return void Date: Mon, 17 Oct 2022 22:01:43 +0200 Message-Id: <20221017200143.1426528-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2956; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=qdLvd2FgQb/E+Oq0ESxa5ffvopjSJfr6ID2Op/GvaRw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBjTbSjq+Wzs7tAZHqf62uASxmZMHg/WQ2Fg0yHhiNq TOyDrp2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY020owAKCRDB/BR4rcrsCVn5B/ 95EeWuhGokejrWgOTQB/uUSAGC40syD9muxugJdiIZ9rYVXqm+RSzlnQlgnjruCRA0aJ8rLpVvF3z3 qnQPChdGUV1n9UHLjCkI0/G9HVIKRrlobE6qy3x9XkXJm7LIz0lgG74SBcVQYX9EulZ8J9qwOozN+5 ofgJsZGEnzMjl1NsW2LtpPleNDmaUH1k6Jo9jPVftzRj/aZH1ygMcvbJnF0dUPzfd7MbBr4uycyzSp 8ksfGsdqd7yMuKpwSDDzehw3XYCr/hNNwI1xpspqpqimozl7XbgB1A3Fg5cLxNGVtrxuhaysWN6pFy Qh1/Cob2TlkIfL9uKK+3h6FDh895oV X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-spi@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The function bcm_qspi_remove() returns zero unconditionally. Make it return void. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Florian Fainelli --- drivers/spi/spi-bcm-qspi.c | 5 ++--- drivers/spi/spi-bcm-qspi.h | 2 +- drivers/spi/spi-brcmstb-qspi.c | 4 +++- drivers/spi/spi-iproc-qspi.c | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780 diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index cad2d55dcd3d..0eee574d3e1f 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -1682,7 +1682,7 @@ int bcm_qspi_probe(struct platform_device *pdev, /* probe function to be called by SoC specific platform driver probe */ EXPORT_SYMBOL_GPL(bcm_qspi_probe); -int bcm_qspi_remove(struct platform_device *pdev) +void bcm_qspi_remove(struct platform_device *pdev) { struct bcm_qspi *qspi = platform_get_drvdata(pdev); @@ -1690,9 +1690,8 @@ int bcm_qspi_remove(struct platform_device *pdev) bcm_qspi_hw_uninit(qspi); clk_disable_unprepare(qspi->clk); kfree(qspi->dev_ids); - - return 0; } + /* function to be called by SoC specific platform driver remove() */ EXPORT_SYMBOL_GPL(bcm_qspi_remove); diff --git a/drivers/spi/spi-bcm-qspi.h b/drivers/spi/spi-bcm-qspi.h index 01aec6460108..3d7c359c0239 100644 --- a/drivers/spi/spi-bcm-qspi.h +++ b/drivers/spi/spi-bcm-qspi.h @@ -96,7 +96,7 @@ static inline u32 get_qspi_mask(int type) /* The common driver functions to be called by the SoC platform driver */ int bcm_qspi_probe(struct platform_device *pdev, struct bcm_qspi_soc_intc *soc_intc); -int bcm_qspi_remove(struct platform_device *pdev); +void bcm_qspi_remove(struct platform_device *pdev); /* pm_ops used by the SoC platform driver called on PM suspend/resume */ extern const struct dev_pm_ops bcm_qspi_pm_ops; diff --git a/drivers/spi/spi-brcmstb-qspi.c b/drivers/spi/spi-brcmstb-qspi.c index 75e9b76dab1e..de362b35718f 100644 --- a/drivers/spi/spi-brcmstb-qspi.c +++ b/drivers/spi/spi-brcmstb-qspi.c @@ -23,7 +23,9 @@ static int brcmstb_qspi_probe(struct platform_device *pdev) static int brcmstb_qspi_remove(struct platform_device *pdev) { - return bcm_qspi_remove(pdev); + bcm_qspi_remove(pdev); + + return 0; } static struct platform_driver brcmstb_qspi_driver = { diff --git a/drivers/spi/spi-iproc-qspi.c b/drivers/spi/spi-iproc-qspi.c index de297dacfd57..91cf8eb7213c 100644 --- a/drivers/spi/spi-iproc-qspi.c +++ b/drivers/spi/spi-iproc-qspi.c @@ -129,7 +129,9 @@ static int bcm_iproc_probe(struct platform_device *pdev) static int bcm_iproc_remove(struct platform_device *pdev) { - return bcm_qspi_remove(pdev); + bcm_qspi_remove(pdev); + + return 0; } static const struct of_device_id bcm_iproc_of_match[] = {