From nobody Thu Oct 2 18:15:52 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 792EB30E83D; Fri, 12 Sep 2025 13:13:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757682835; cv=none; b=NzvLGN2mKOhUMKsKtbpUwcxD4wwe8ZqSxa4twGjbrknekYbNtDufx0AoSV50vqyMEkgfLAE4NAzGUqOF6THmcYySJDlYGF0jyLAfbNHiTqC6Ma8AFTHoXPvxCcY3Of2N2+D+9pFDh/LQ56skgrjy9xGSl17S8Ske8CAR1A8jv5M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757682835; c=relaxed/simple; bh=53zhH/LYQFFz1Wl4Yt+O8tMgixCVsPRKlvjRAxLnYME=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kSfClcfOSVid6dvvOTdWLcN5zxcR+IGigd7YKq1cBRg21BJ16d6ec4bNn7+AnI/a5RAvAEr/FTcVcG0EtajCH2dSnwxy6TVJh00M0XIZqxu43l5bEew8Ybj/iEpGPl2JPtD/eJ+zBWrkkBb48HNoSwmN3xW6isGtUNpxarIaKOk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CyGbXbiw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CyGbXbiw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0C11C4CEF4; Fri, 12 Sep 2025 13:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757682835; bh=53zhH/LYQFFz1Wl4Yt+O8tMgixCVsPRKlvjRAxLnYME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CyGbXbiwX2aPQ7/qAyEBZYYJ6loFOTSkUqLLsj4Ojd7MAgJEUluifrJ5ptLO8Gem0 6SG9Qmws20EwBdU898XbTwCy+aGnilh3MGNSnzSxDTuXhMkaYV2pC+2ZZZ5DDIDvM/ A+bll1wHIZZj5gP4zQh///W4hB1jmg7xFtE4Xp/iKjsoqSOb3k+sA1w7KTbkkmA5XN hDyLCp3xB2ucNb4O8t8xZfSiMWyR0zk6S9idITu2IhvXV0zOjKX56VncILLnRkdTyB TK5l6ieD6Sxz6ljh6zt/XYpFngpaMj4wy5BXVHJ/1tRPeAwkBlY2sSHH4P8+0F3cPv mDUgnQmQIX5LQ== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Michael Walle , stable@vger.kernel.org, Miquel Raynal , Srinivas Kandagatla Subject: [PATCH 1/1] nvmem: layouts: fix automatic module loading Date: Fri, 12 Sep 2025 14:13:47 +0100 Message-ID: <20250912131347.303345-2-srini@kernel.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250912131347.303345-1-srini@kernel.org> References: <20250912131347.303345-1-srini@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Michael Walle To support loading of a layout module automatically the MODALIAS variable in the uevent is needed. Add it. Fixes: fc29fd821d9a ("nvmem: core: Rework layouts to become regular devices= ") Cc: stable@vger.kernel.org Signed-off-by: Michael Walle Reviewed-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/layouts.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/nvmem/layouts.c b/drivers/nvmem/layouts.c index 65d39e19f6ec..f381ce1e84bd 100644 --- a/drivers/nvmem/layouts.c +++ b/drivers/nvmem/layouts.c @@ -45,11 +45,24 @@ static void nvmem_layout_bus_remove(struct device *dev) return drv->remove(layout); } =20 +static int nvmem_layout_bus_uevent(const struct device *dev, + struct kobj_uevent_env *env) +{ + int ret; + + ret =3D of_device_uevent_modalias(dev, env); + if (ret !=3D ENODEV) + return ret; + + return 0; +} + static const struct bus_type nvmem_layout_bus_type =3D { .name =3D "nvmem-layout", .match =3D nvmem_layout_bus_match, .probe =3D nvmem_layout_bus_probe, .remove =3D nvmem_layout_bus_remove, + .uevent =3D nvmem_layout_bus_uevent, }; =20 int __nvmem_layout_driver_register(struct nvmem_layout_driver *drv, --=20 2.50.0