Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2512337rwb; Mon, 3 Oct 2022 01:40:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ztzM7pgOfaySCLOzM3puHDjXcRsJT4kySE6PM4K+e+cYJI61rmXhvcZEzf7CX5nJiVlCZ X-Received: by 2002:a17:902:8bc1:b0:17a:a61:ce68 with SMTP id r1-20020a1709028bc100b0017a0a61ce68mr20856954plo.66.1664786412295; Mon, 03 Oct 2022 01:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664786412; cv=none; d=google.com; s=arc-20160816; b=08EP4Qpuul+013MCYX1hhKN1hy4f782iAgZcc5ehYsuDxE8XtwKcpkRqt5RVzNEM3c t/K17ejW92EecLCFlfSmm5For13Jte+CunCuzeCpA4EVZ8C2W+J5UU4mtzNSR+r39KUN VdNQsraTcxmA/OWhI0eh35/uYh2lOZxLYPbDfklxUQ8iyxBdUDaZwwjbuhpCwXRBRGyQ Qd7IT9q5sCxLAZkpx2MSzSYpvB9Fqw/qIrmsnJKnDUWn7GmmmfAE/zdrblWPvnDxMpqr rzDtqf6aDjhewot/UgiAv0G70U8nE3v0ANNAfT2b3j33PKurY8ljJ/y+uvnEP6lJM5RQ UboQ== 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=wXjgsQGs3qYnUFBEJBX1nvXENyw6Z5tVgOnXOk/+X2Q=; b=SaQE0Ic4blaFg9mp0Njq6FePxcU3S+SmcndfluNbRIY1dN8/Ci5Utc/BXlerLHyloL GFnTbxEDAQHUAb11PEbDCPvUb8HoIz7+97HrZX+TuhNY9+XFi8GJ1FZKmdYUIt29pPO3 ClmdRIrP+658GhNoj1KWMyWSPRsEHNv/0I51NkLNmRPAqDjUdKCkYHKJDX8G4j/E+OGL vxAznhoZYfblHXn2c2oi0vRyfJ0bPPxih9xIoMszDl1FPQBXVmmpLqbHwXmfzQpomK16 LzJ6G8qL1z42jTJOiN3zaB8ZxHO62IS713yxqsYLlu3QpzFOlgiOdJrzr+As3PxEGVjW 4J3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0ZuNS4Bb; 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 v13-20020a63150d000000b00438e3cbe7c3si9308114pgl.664.2022.10.03.01.40.01; Mon, 03 Oct 2022 01:40:12 -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=0ZuNS4Bb; 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 S229782AbiJCIZJ (ORCPT + 99 others); Mon, 3 Oct 2022 04:25:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230408AbiJCIY2 (ORCPT ); Mon, 3 Oct 2022 04:24:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A36EE7C74B; Mon, 3 Oct 2022 00:58:52 -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 42F3AB80E84; Mon, 3 Oct 2022 07:25:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA544C433D6; Mon, 3 Oct 2022 07:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781933; bh=mrRFi32sbq9Rq0GDubF8C4u0vJyiLjztz12bHOgC7Ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0ZuNS4BbWdrXlik9IUmnLXuNBdCHDhfWxmgrWKQrto4toveFAyZjsDkNrA+tTUhu7 AD7Fv091as0F4johjetPRLMgTln/ggel3TaAfJGIDGKcq18vyY+58SDXj9riTsGjWD 2ygqgJnx+DAy6ATI1Kv17bAZ995SkSa7kZyo4vIc= 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 4.19 16/25] soc: sunxi: sram: Prevent the driver from being unbound Date: Mon, 3 Oct 2022 09:12:19 +0200 Message-Id: <20221003070715.894740740@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070715.406550966@linuxfoundation.org> References: <20221003070715.406550966@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 51148704af49..17ac818622fe 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -325,7 +325,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; @@ -399,9 +399,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