Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2490872rwb; Mon, 3 Oct 2022 01:12:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6AFTBmcVo7Pp8A4tzauvBEtWfIGIoVohUDtWa3hIHtai93VFervBTmfVo/Mp7D0fuJ3NF7 X-Received: by 2002:a05:6a02:112:b0:440:5515:b908 with SMTP id bg18-20020a056a02011200b004405515b908mr16224954pgb.13.1664784744964; Mon, 03 Oct 2022 01:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664784744; cv=none; d=google.com; s=arc-20160816; b=XrQZ+9PVRtxf9vwUqpy1ZRagcknn6vRbkN4zVzG93k6IsJCrAMyg67mirDzZG8nKMb O7+W2fShFW8ak1ySnWIPQUEbbGVMW1ZQaQPf+3lhd2VZ33nch59MHz30dIvCwuouM3v7 EkOnYESjakzCfqUFXK8cyH+WLa45GoR4GXPXWMW2awolkHgpGYaND+CabiiDqNu9fut3 9RtLviKUv7EtEvPMPO5enclv0HaqY4QdDfI0RuOnrG9fpxIb8SD6jW9gBmwmuk3gcdOM GPcMZm5p1XTKznPVszIR2O7sU7+3ZT8/ZxAIIDLMEd+Bd1ovf4TDw3b4vzJ7wDDOQYZZ MGkw== 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=hqG3g3xtZhoH8X2hbQvqfOSJMWmCcQRuUHaG2313SNA=; b=AYXikr8fGGcurg2GqeOBpaJNy9NDp1IJiVGThsgM1iEtRhAM7uZNyU8p2DNY77lD5c AQCUMgzndwIfFA4ulLyOH8SfQFyl2pj2+KHtNldy5iDmVb18foxeW7MZ4H84lyjhXxeK kVzP+9W3OCyaE/EYMr4Lh1LXi1NIBqfrXFoHuq5dvCykyHe0tm91hsDTdsIF3PnHXdHo 5a3zdWDNDHdgE9nrEGfo2GWFJCQSo6OVIFsSlynR+bTYVLLCVjqJfTOeAP0y/CycjpyR sXSj/gQ/og6V1gScwMSikRi5bjUv0BB0fQNsUHsrZjp2GCz3YJIB5Mnx1IrXz4h4c6p5 o7LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RM30Vn/Y"; 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 p3-20020a170903248300b001614cd997a6si8870488plw.481.2022.10.03.01.12.13; Mon, 03 Oct 2022 01:12:24 -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="RM30Vn/Y"; 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 S230477AbiJCH1I (ORCPT + 99 others); Mon, 3 Oct 2022 03:27:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbiJCHZQ (ORCPT ); Mon, 3 Oct 2022 03:25:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC564BD09; Mon, 3 Oct 2022 00:18:23 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D71C960FB6; Mon, 3 Oct 2022 07:18:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9F66C433D6; Mon, 3 Oct 2022 07:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781499; bh=e/w8t1fK9RfuxqU3rq65AWjAzC+JxuL7MvWCo2+Hd7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RM30Vn/YyEtjkb3bMA6gX00wOAMn981smzmvWoSlQ4wfT730L9SwpdYoqWzJi/TfH G60e1/bFYUzDLXm3Tl3xX/lXESp18A1dYuPGkU3troCk+FnSFioxlAl/oXaFFbLczR nTUjyxbdGtjUF6UvPx3gxYRX/uVD8+UOUEperRoI= 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.15 43/83] soc: sunxi: sram: Prevent the driver from being unbound Date: Mon, 3 Oct 2022 09:11:08 +0200 Message-Id: <20221003070723.076001638@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070721.971297651@linuxfoundation.org> References: <20221003070721.971297651@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 20b5d38e6da8..852f0872f669 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -330,7 +330,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; @@ -412,9 +412,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