Messages in this thread Patch in this message | | | From | Nícolas F. R. A. Prado <> | Subject | [PATCH v2 5/7] firmware: google: memconsole: Add to module device table | Date | Fri, 12 Jan 2024 10:18:34 -0300 |
| |
Create an id table and add it to the module device table to allow the memconsole driver to be automatically loaded when a matching device is found.
Suggested-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Changes in v2: - Added this commit
drivers/firmware/google/memconsole-coreboot.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/drivers/firmware/google/memconsole-coreboot.c b/drivers/firmware/google/memconsole-coreboot.c index 74b5286518ee..b8e65b9d8cc0 100644 --- a/drivers/firmware/google/memconsole-coreboot.c +++ b/drivers/firmware/google/memconsole-coreboot.c @@ -11,6 +11,7 @@ #include <linux/io.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include "memconsole.h" #include "coreboot_table.h" @@ -96,6 +97,12 @@ static void memconsole_remove(struct coreboot_device *dev) memconsole_exit(); } +static const struct coreboot_device_id memconsole_ids[] = { + { .tag = CB_TAG_CBMEM_CONSOLE }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(coreboot, memconsole_ids); + static struct coreboot_driver memconsole_driver = { .probe = memconsole_probe, .remove = memconsole_remove, -- 2.43.0
| |