From patchwork Wed Sep 28 15:55:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 12992451 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 87FB8C32771 for ; Wed, 28 Sep 2022 15:57:15 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=19l2AUuyp/xAZla/4J39kjhsITAl5K3TmPPNrCV6DC8=; b=Thy8B4+YXMWWEM YePzhT64f1OpMqe8qtcN1ypuZ6EtTdme0CjH3RTG1r4RRwRXR5EfsuGlLH7/ORmb3LIkN/rJQsZau Guh7TSTj+FA14YNJmX3/rrPYKZzxbR95VFtjA4uO7uIqphuaOlIu17hMmRhLp0yO90+g713rmWpns 4uW7Coq0D1cYOXka7aNxPJrdHZAa4T4tbkqi+GvmvcH24LgeNwN1A9P0mPP8nbQ2ANU50O58VtNrl DE+qNSjBQ5T+L3pV8DSwPO7QKlzEsGF/1HCAMxRkVOvzz+83Sz9dVdICDg4XZQbWIet5K0PPML+xT O5101nZyZprYlBR9haBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odZQ1-00Gzc9-82; Wed, 28 Sep 2022 15:56:17 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odZPN-00GzHe-RW; Wed, 28 Sep 2022 15:55:39 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 34162B8211C; Wed, 28 Sep 2022 15:55:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 136FEC433C1; Wed, 28 Sep 2022 15:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664380535; bh=a1LAVlDHkces/5MDyjvZevj2YKY09OrPDHZaF2N9pnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hjSVvQHG6b9D4itNHwL1SG4xfd79oh//JrtvpPK1D3kaUsuXKvEQurdibHWlezXB8 LBlRnzdmzrQ1OhrvK7xmRIGoADyLNdbwSWP83T/p6Siy7Tdq+i+K88yB9vJV+C/fCy v4d94YYSn+VI3i3nCiIpIi/MSW791yjNUVr97BX/2iq4xoCewz+4knHzmxQxlxsGt1 zIxvZrUPWZ3TN0sgZ/Ojv52KiF4aPvkorkdiFcFc2p4SlPlOwA44HuDOZsqZdXyQw1 FU8fGA5G3S2gyvTOXem8BS3XpySetdvePLMdV81VfqD17xEGfv4x4Upa+01bW4RJeL FE2UwX/8guwVQ== From: matthias.bgg@kernel.org To: roger.lu@mediatek.com, jia-wei.chang@mediatek.com Cc: nfraprado@collabora.com, khilman@baylibre.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, Matthias Brugger Subject: [PATCH 3/8] soc: mediatek: mtk-svs: move svs_platform_probe into probe Date: Wed, 28 Sep 2022 17:55:14 +0200 Message-Id: <20220928155519.31977-4-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928155519.31977-1-matthias.bgg@kernel.org> References: <20220928155519.31977-1-matthias.bgg@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220928_085538_076623_FAFBD7B9 X-CRM114-Status: GOOD ( 13.34 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Matthias Brugger Moving svs_platform_probe into driver probe function will allow us to reduce svs_platform members. This will be done in a follow-up patch. Signed-off-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno --- drivers/soc/mediatek/mtk-svs.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index 52bb4f8bbe6d..8342627f8dea 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -2325,17 +2325,17 @@ static const struct of_device_id svs_of_match[] = { }, }; -static struct svs_platform *svs_platform_probe(struct platform_device *pdev) +static int svs_probe(struct platform_device *pdev) { struct svs_platform *svsp; const struct svs_platform_data *svsp_data; - int ret; + int ret, svsp_irq; svsp_data = of_device_get_match_data(&pdev->dev); svsp = devm_kzalloc(&pdev->dev, sizeof(*svsp), GFP_KERNEL); if (!svsp) - return ERR_PTR(-ENOMEM); + return -ENOMEM; svsp->dev = &pdev->dev; svsp->name = svsp_data->name; @@ -2346,19 +2346,7 @@ static struct svs_platform *svs_platform_probe(struct platform_device *pdev) ret = svsp_data->probe(svsp); if (ret) - return ERR_PTR(ret); - - return svsp; -} - -static int svs_probe(struct platform_device *pdev) -{ - struct svs_platform *svsp; - int svsp_irq, ret; - - svsp = svs_platform_probe(pdev); - if (IS_ERR(svsp)) - return PTR_ERR(svsp); + return ret; if (!svs_is_efuse_data_correct(svsp)) { dev_notice(svsp->dev, "efuse data isn't correct\n");