From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ard Biesheuvel <ardb@kernel.org>,
linux-efi@vger.kernel.org
Subject: [PATCH v2 6/8] efi: efivars: Transition to the faux device interface
Date: Tue, 18 Mar 2025 17:01:44 +0000 [thread overview]
Message-ID: <20250318-plat2faux_dev-v2-6-e6cc73f78478@arm.com> (raw)
In-Reply-To: <20250318-plat2faux_dev-v2-0-e6cc73f78478@arm.com>
The "efivars" platform device is created just to enable the efi-pstore
module to autoload based on it. It doesn't have to be platform device
though. Originally, this approach was chosen for simplicity when the
driver was first implemented.
With the introduction of the lightweight faux device interface, we now
have a more appropriate alternative. Migrate this efivars device to
utilize the faux bus, given that the platform device it previously
created was not a real one anyway.
The modalias is retained here as efi-pstore module is dependent on it.
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/firmware/efi/efi-pstore.c | 2 +-
drivers/firmware/efi/efi.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
index a253b61449459eca31afc6ca780a20c4557659ba..eed756a59bba3b5a58cd2e238400c3c12fd5edd5 100644
--- a/drivers/firmware/efi/efi-pstore.c
+++ b/drivers/firmware/efi/efi-pstore.c
@@ -301,4 +301,4 @@ module_exit(efivars_pstore_exit);
MODULE_DESCRIPTION("EFI variable backend for pstore");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:efivars");
+MODULE_ALIAS("faux:efivars");
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 862b7744c28ecc9e5a64bbb3533c34119f50267f..dc5c24a7ca540cac342ceddcdbf75b55bf82c889 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -24,7 +24,7 @@
#include <linux/initrd.h>
#include <linux/io.h>
#include <linux/kexec.h>
-#include <linux/platform_device.h>
+#include <linux/device/faux.h>
#include <linux/random.h>
#include <linux/reboot.h>
#include <linux/slab.h>
@@ -443,7 +443,7 @@ static int __init efisubsys_init(void)
error = efivar_ssdt_load();
if (error)
pr_err("efi: failed to load SSDT, error %d.\n", error);
- platform_device_register_simple("efivars", 0, NULL, 0);
+ faux_device_create("efivars", NULL, NULL);
}
BLOCKING_INIT_NOTIFIER_HEAD(&efivar_ops_nh);
--
2.34.1
prev parent reply other threads:[~2025-03-18 17:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 17:01 [PATCH v2 0/8] drivers: Transition to the faux device interface Sudeep Holla
2025-03-18 17:01 ` [PATCH v2 4/8] rtc: efi: " Sudeep Holla
2025-04-08 14:45 ` (subset) " Alexandre Belloni
2025-04-08 15:01 ` Sudeep Holla
2025-03-18 17:01 ` [PATCH v2 5/8] virt: efi_secret: " Sudeep Holla
2025-03-18 17:10 ` Ard Biesheuvel
2025-03-19 13:15 ` Sudeep Holla
2025-03-19 14:24 ` Greg Kroah-Hartman
2025-03-19 14:30 ` Sudeep Holla
2025-03-18 17:01 ` Sudeep Holla [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250318-plat2faux_dev-v2-6-e6cc73f78478@arm.com \
--to=sudeep.holla@arm.com \
--cc=ardb@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox