@@ -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,
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@chromium.org> Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com> --- Changes in v2: - Added this commit drivers/firmware/google/vpd.c | 7 +++++++ 1 file changed, 7 insertions(+)