Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2490768rwb; Mon, 3 Oct 2022 01:12:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM443Dbd3uOUgxZhE6ZlpEblTOaSo4raJv+5CvjjkLT3+HRrv7dv+tRDnKFbU3zMD6GlAeqc X-Received: by 2002:a17:90a:cc9:b0:203:ab27:78c7 with SMTP id 9-20020a17090a0cc900b00203ab2778c7mr10616552pjt.123.1664784735092; Mon, 03 Oct 2022 01:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664784735; cv=none; d=google.com; s=arc-20160816; b=kf5SyrsuIDH6eea0by/jV6O7P3llsv2bHDP0yfgIeZKqqofMBMrO6EjlFV1KkrGC1L TsXtleTi3KO9ZkhZd2l/in8It8BPwOkvhD6iewDp8YAikkqZm3A3umX6F2CTRzf6SzGt AgIbtyXLp2KkWz7I0wBdnUD3yNwnLM6NawxEjHnhbSj2cynvFCiMC5cg1sOZrFYz5YjL o0P6wglnIgsTbVCcLT0BuCqpjGE2TA9MZVv6Ny0rMl8b1enSvDDuEas6XhRoML3qBQzM GLoUvpcUhBggIHTziyBDl+VuF4vXdTZio7qSCqrMcCGQYjrKBF/QTtjj4Bn0pKspxpy6 v5eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v7q/SDw6erj2eEyVhvd4qOChxR8t8/Hrgg3nJnuVD08=; b=wOl6gMIER+erAozIW9ormw39IpMp51CWE4pQarsgZBGUtlYu5kxFS0akwrIFiQavMG SFJ4esoN6usgImMObzHUR0tDGL1zRFHhi5d5C53Oy78fQkFeJaPmgCDReJxtFS/OYGFs roBsCPg5jo1k5sIb+GMSpysiqwxQllS28TGrUxCeqyjalVa2CQO83+EmnzWfzFD1nwXe upyc8FKa4uK7ffASTK3YzGuPjywPNY7ScyEsP8iXoXWsKD0iePEL/dNJoBhRtnJCI46i 5jHlzR6bTdPDkrKGptvoAb4RtouyKBn0OWnRzHxw+j59NkJhxRNjhFoiBQSqREYGr8vf VQxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IlHYHYwn; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a63490c000000b004350783ee63si9642603pga.237.2022.10.03.01.12.02; Mon, 03 Oct 2022 01:12:15 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=IlHYHYwn; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbiJCHii (ORCPT + 99 others); Mon, 3 Oct 2022 03:38:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231489AbiJCHgx (ORCPT ); Mon, 3 Oct 2022 03:36:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77BB752444; Mon, 3 Oct 2022 00:22:53 -0700 (PDT) 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 CE3AAB80E90; Mon, 3 Oct 2022 07:22:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2439FC433D6; Mon, 3 Oct 2022 07:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781771; bh=cjkL03dcTyt0BEdfkQi1U/RpEDIxrDOSFO06tI5+HqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IlHYHYwnkxbD5As/bWSPIFu9EvRyuC8LnaZiog2Aav6YqctS6YWsfjJI2Zz2b7AoL 2p+vQjq0h2Nj6LPBpkNIBo6O3xYktc47owRXES3FUeBnzQr7OI62Pyc6EIvwsA6JXX yxSgSuk7VRzaoUJczb6DUamYuIT/Cp/GwgEZM+MI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jernej Skrabec , Samuel Holland , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.10 34/52] soc: sunxi: sram: Prevent the driver from being unbound Date: Mon, 3 Oct 2022 09:11:41 +0200 Message-Id: <20221003070719.748079491@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070718.687440096@linuxfoundation.org> References: <20221003070718.687440096@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: Samuel Holland [ Upstream commit 90e10a1fcd9b24b4ba8c0d35136127473dcd829e ] This driver exports a regmap tied to the platform device (as opposed to a syscon, which exports a regmap tied to the OF node). Because of this, the driver can never be unbound, as that would destroy the regmap. Use builtin_platform_driver_probe() to enforce this limitation. Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64") Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220815041248.53268-5-samuel@sholland.org Signed-off-by: Sasha Levin --- drivers/soc/sunxi/sunxi_sram.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c index 5d1305483542..ccf42086f6ca 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -319,7 +319,7 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = { .writeable_reg = sunxi_sram_regmap_accessible_reg, }; -static int sunxi_sram_probe(struct platform_device *pdev) +static int __init sunxi_sram_probe(struct platform_device *pdev) { struct resource *res; struct dentry *d; @@ -397,9 +397,8 @@ static struct platform_driver sunxi_sram_driver = { .name = "sunxi-sram", .of_match_table = sunxi_sram_dt_match, }, - .probe = sunxi_sram_probe, }; -module_platform_driver(sunxi_sram_driver); +builtin_platform_driver_probe(sunxi_sram_driver, sunxi_sram_probe); MODULE_AUTHOR("Maxime Ripard "); MODULE_DESCRIPTION("Allwinner sunXi SRAM Controller Driver"); -- 2.35.1