[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240111151226.842603-4-nfraprado@collabora.com>
Date: Thu, 11 Jan 2024 12:11:48 -0300
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: Tzung-Bi Shih <tzungbi@...nel.org>
Cc: kernel@...labora.com,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Nícolas F. R. A. Prado <nfraprado@...labora.com>,
Brian Norris <briannorris@...omium.org>,
Julius Werner <jwerner@...omium.org>,
chrome-platform@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] firmware: google: cbmem: Add to module device table
Create an id table and add it to the module device table to allow the
cbmem driver to be automatically loaded when a matching device is found.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
drivers/firmware/google/cbmem.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/firmware/google/cbmem.c b/drivers/firmware/google/cbmem.c
index 88e587ba1e0d..ceb89b4cdbe0 100644
--- a/drivers/firmware/google/cbmem.c
+++ b/drivers/firmware/google/cbmem.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/kobject.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
@@ -114,6 +115,12 @@ static int cbmem_entry_probe(struct coreboot_device *dev)
return 0;
}
+static const struct coreboot_device_id cbmem_ids[] = {
+ { .tag = LB_TAG_CBMEM_ENTRY },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(coreboot, cbmem_ids);
+
static struct coreboot_driver cbmem_entry_driver = {
.probe = cbmem_entry_probe,
.drv = {
--
2.43.0
Powered by blists - more mailing lists