[v2,5/7] firmware: google: memconsole: Add to module device table
Commit Message
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(+)
@@ -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,