@@ -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");
@@ -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);
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(-)