Patch "soc: sunxi: sram: Prevent the driver from being unbound" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    soc: sunxi: sram: Prevent the driver from being unbound

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     soc-sunxi-sram-prevent-the-driver-from-being-unbound.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b249c8897b62a1f9cd67d302a068e1db855669df
Author: Samuel Holland <samuel@xxxxxxxxxxxx>
Date:   Sun Aug 14 23:12:41 2022 -0500

    soc: sunxi: sram: Prevent the driver from being unbound
    
    [ 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 <jernej.skrabec@xxxxxxxxx>
    Signed-off-by: Samuel Holland <samuel@xxxxxxxxxxxx>
    Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>
    Tested-by: Heiko Stuebner <heiko@xxxxxxxxx>
    Signed-off-by: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20220815041248.53268-5-samuel@xxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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 <maxime.ripard@xxxxxxxxxxxxxxxxxx>");
 MODULE_DESCRIPTION("Allwinner sunXi SRAM Controller Driver");



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux