aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/google/framebuffer-coreboot.c
diff options
context:
space:
mode:
authorNĂ­colas F. R. A. Prado <[email protected]>2024-02-12 14:50:07 +0000
committerTzung-Bi Shih <[email protected]>2024-02-17 00:53:06 +0000
commit8a0a62941a042612f7487f6c4ff291f9054ff214 (patch)
treefe15f68ecdbcdd38f4bdc3f07ed03f5153ebe0ff /drivers/firmware/google/framebuffer-coreboot.c
parentfirmware: coreboot: Generate aliases for coreboot modules (diff)
downloadkernel-8a0a62941a042612f7487f6c4ff291f9054ff214.tar.gz
kernel-8a0a62941a042612f7487f6c4ff291f9054ff214.zip
firmware: coreboot: Replace tag with id table in driver struct
Switch the plain 'tag' field in struct coreboot_driver for the newly created coreboot_device_id struct, which also contains a tag field and has the benefit of allowing modalias generation, and update all coreboot drivers accordingly. While at it, also add the id table for each driver to the module device table to allow automatically loading the module. Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: NĂ­colas F. R. A. Prado <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
Diffstat (limited to 'drivers/firmware/google/framebuffer-coreboot.c')
-rw-r--r--drivers/firmware/google/framebuffer-coreboot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/firmware/google/framebuffer-coreboot.c b/drivers/firmware/google/framebuffer-coreboot.c
index 5c84bbebfef8..07c458bf64ec 100644
--- a/drivers/firmware/google/framebuffer-coreboot.c
+++ b/drivers/firmware/google/framebuffer-coreboot.c
@@ -80,13 +80,19 @@ static void framebuffer_remove(struct coreboot_device *dev)
platform_device_unregister(pdev);
}
+static const struct coreboot_device_id framebuffer_ids[] = {
+ { .tag = CB_TAG_FRAMEBUFFER },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(coreboot, framebuffer_ids);
+
static struct coreboot_driver framebuffer_driver = {
.probe = framebuffer_probe,
.remove = framebuffer_remove,
.drv = {
.name = "framebuffer",
},
- .tag = CB_TAG_FRAMEBUFFER,
+ .id_table = framebuffer_ids,
};
module_coreboot_driver(framebuffer_driver);