[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240112131857.900734-5-nfraprado@collabora.com>
Date: Fri, 12 Jan 2024 10:18:33 -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>,
chrome-platform@...ts.linux.dev,
Nícolas F. R. A. Prado <nfraprado@...labora.com>,
Brian Norris <briannorris@...omium.org>,
Julius Werner <jwerner@...omium.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 4/7] firmware: google: vpd: Add to module device table
Create an id table and add it to the module device table to allow the
vpd driver to be automatically loaded when a matching device is found.
Suggested-by: Brian Norris <briannorris@...omium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
Changes in v2:
- Added this commit
drivers/firmware/google/vpd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c
index ee6e08c0592b..9e9fe9ca1920 100644
--- a/drivers/firmware/google/vpd.c
+++ b/drivers/firmware/google/vpd.c
@@ -14,6 +14,7 @@
#include <linux/kobject.h>
#include <linux/list.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
@@ -306,6 +307,12 @@ static void vpd_remove(struct coreboot_device *dev)
kobject_put(vpd_kobj);
}
+static const struct coreboot_device_id vpd_ids[] = {
+ { .tag = CB_TAG_VPD },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(coreboot, vpd_ids);
+
static struct coreboot_driver vpd_driver = {
.probe = vpd_probe,
.remove = vpd_remove,
--
2.43.0
Powered by blists - more mailing lists