diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-14 02:48:15 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-14 02:48:15 +0300 |
commit | a7c840ba5fa78d7761b9fedc33d69cef44986d79 (patch) | |
tree | d1a862b130fd17c393a55575d39c4442809ea763 /drivers/firmware/google/coreboot_table.h | |
parent | 59729c8a76544d9d7651287a5d28c5bf7fc9fccc (diff) | |
parent | 7f20f21c22aa22e488530f66bf4fc168e427f5bd (diff) | |
download | linux-a7c840ba5fa78d7761b9fedc33d69cef44986d79.tar.xz |
Merge tag 'tag-chrome-platform-firmware-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
Pull chrome platform firmware updates from Tzung-Bi Shih:
- Set driver owner in the core registration so that coreboot drivers
don't need to set it individually
* tag 'tag-chrome-platform-firmware-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
firmware: google: cbmem: drop driver owner initialization
firmware: coreboot: store owner from modules with coreboot_driver_register()
Diffstat (limited to 'drivers/firmware/google/coreboot_table.h')
-rw-r--r-- | drivers/firmware/google/coreboot_table.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/firmware/google/coreboot_table.h b/drivers/firmware/google/coreboot_table.h index 86427989c57f..bb6f0f7299b4 100644 --- a/drivers/firmware/google/coreboot_table.h +++ b/drivers/firmware/google/coreboot_table.h @@ -97,8 +97,12 @@ struct coreboot_driver { const struct coreboot_device_id *id_table; }; +/* use a macro to avoid include chaining to get THIS_MODULE */ +#define coreboot_driver_register(driver) \ + __coreboot_driver_register(driver, THIS_MODULE) /* Register a driver that uses the data from a coreboot table. */ -int coreboot_driver_register(struct coreboot_driver *driver); +int __coreboot_driver_register(struct coreboot_driver *driver, + struct module *owner); /* Unregister a driver that uses the data from a coreboot table. */ void coreboot_driver_unregister(struct coreboot_driver *driver); |