Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11710097rwl; Tue, 3 Jan 2023 03:40:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXt55YhI06FgESCVbTGTfu6h4K09v5TlmqUGo1s5kHz6f73oZs1Kjs5U9sndl5YJB+fysycM X-Received: by 2002:a05:6402:203:b0:48e:96d1:63c2 with SMTP id t3-20020a056402020300b0048e96d163c2mr3836069edv.14.1672746036218; Tue, 03 Jan 2023 03:40:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672746036; cv=none; d=google.com; s=arc-20160816; b=GSB7rvTWxSD+uo/PAP9fPXSzFGO/6NRxjMNf1Rz7C8IatjHjmnbEU69Yd5af+jKOyP 7k7nCWrveKbkDTxOKTVgapLXAEPNLqkRivCOOQ0lQn/v4TrGScltvy1IqbiIhViJZ7qD d5c8JBgkou7IEsSyCHDvdQF+2vKB03LobMB75HBiXzhkRuqNqgf6Fz/D4O63kJivFiMP AU/hwzL5PyU1z6I2gKEqElpbTDynSf9nMgreAmP+pEwryrppg1AOlbZQiT59I3Ji/f1r Bzpw/RIqTKmNqi1fUJPr4IKyR+6RJJJx2t+gVr/9jdKFvouUm5bS9nUBpF25yNTncP3K Hfww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4gNcF7vsUH3TomKrULGmuoGv4uA8ZyTj2XFNqGbNkWo=; b=0RTzbh/NOFULGTj49xYlTMjCNruQTtbYorJLuy3iXGsm1pOd7XLnxj+t1q4YSRE0Kt hGGXMMsI2IXdz6JmCq3zg+kR7aw2BNT0WJmYvsMHDqirM4U+3EffGponkjVOMzasY8pM BNYaaDP+GcfbMzU16D1V7TmxyyjNKvsnPZvD5+vmLe37R+oVXWTU/8DqinNaF5BIxjJf uK2QlxY03NWhHZDEPd4+eSldB5ShMUa+s5cBFrVr8l3UTGmX5gbAjRENaw50ozhZgtjG nK396fS780G+bvIum2Sd29b4yZF12fwDuU/QZla3DKsGHmf4tP+a2UhfSczQOzvi6IQU Kvxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UCyBMSNL; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z99-20020a509e6c000000b0046c9a4ab639si25649838ede.548.2023.01.03.03.40.22; Tue, 03 Jan 2023 03:40:36 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=UCyBMSNL; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237518AbjACLae (ORCPT + 61 others); Tue, 3 Jan 2023 06:30:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237448AbjACL3o (ORCPT ); Tue, 3 Jan 2023 06:29:44 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 258DA10042; Tue, 3 Jan 2023 03:29:38 -0800 (PST) X-UUID: f69125d12c6d445197d68a33d7d36f85-20230103 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=4gNcF7vsUH3TomKrULGmuoGv4uA8ZyTj2XFNqGbNkWo=; b=UCyBMSNLCktALEJjdn1Tg5zzc/hJxnJ1IcL+KpwjWAjSO3BQ5MjCfuc5RBqumGSMrOdqaqWRYZYboXrHC9HKBuSiLhEOiOuq3ZBHzXZ6ogAzeO0wnxIskaWvh0IW8FHR41WnKBj6zPLttWqErqNJRxlOnUF1B7DS7Bshw02nz3E=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.16,REQID:711e4342-8c0e-47e4-9d64-71e63ffc8008,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:70 X-CID-INFO: VERSION:1.1.16,REQID:711e4342-8c0e-47e4-9d64-71e63ffc8008,IP:0,URL :0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTI ON:quarantine,TS:70 X-CID-META: VersionHash:09771b1,CLOUDID:719e1b8b-8530-4eff-9f77-222cf6e2895b,B ulkID:230103192931P9V2WQ1E,BulkQuantity:1,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:11|1,File:nil,Bulk:40,QS:nil,BEC:nil,COL:0, OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: f69125d12c6d445197d68a33d7d36f85-20230103 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1460600979; Tue, 03 Jan 2023 19:29:28 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.186) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 3 Jan 2023 19:29:27 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 3 Jan 2023 19:29:27 +0800 From: Roger Lu To: Matthias Brugger , Enric Balletbo Serra , Kevin Hilman , Nicolas Boichat CC: Fan Chen , Roger Lu , Jia-wei Chang , , , , , , Subject: [PATCH v3 05/14] soc: mediatek: mtk-svs: move svs_platform_probe into probe Date: Tue, 3 Jan 2023 19:29:16 +0800 Message-ID: <20230103112925.16554-6-roger.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230103112925.16554-1-roger.lu@mediatek.com> References: <20230103112925.16554-1-roger.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,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 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 Signed-off-by: Roger Lu --- 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 7fea1a5bb842..bbec96696c55 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"); -- 2.18.0