diff options
| author | Stephen Boyd <[email protected]> | 2019-05-10 18:01:47 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-05-24 18:55:04 +0000 |
| commit | 354635039d935dba16ba35054b27dd6671fd3d14 (patch) | |
| tree | 0d329048115c18436a1cbd847424b321967f552e /drivers/firmware/google/framebuffer-coreboot.c | |
| parent | chardev: set variable ret to -EBUSY before checking minor range overlap (diff) | |
| download | kernel-354635039d935dba16ba35054b27dd6671fd3d14.tar.gz kernel-354635039d935dba16ba35054b27dd6671fd3d14.zip | |
firmware: google: Add a module_coreboot_driver() macro and use it
Remove some boiler plate code we have in three drivers with a single
line each time. This also gets us a free assignment of the driver .owner
field, making these drivers work better as modules.
Cc: Wei-Ning Huang <[email protected]>
Cc: Julius Werner <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: Samuel Holland <[email protected]>
Cc: Guenter Roeck <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Reviewed-by: Julius Werner <[email protected]>
Reviewed-by: Samuel Holland <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/firmware/google/framebuffer-coreboot.c')
| -rw-r--r-- | drivers/firmware/google/framebuffer-coreboot.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/firmware/google/framebuffer-coreboot.c b/drivers/firmware/google/framebuffer-coreboot.c index b8b49c067157..69a43116211c 100644 --- a/drivers/firmware/google/framebuffer-coreboot.c +++ b/drivers/firmware/google/framebuffer-coreboot.c @@ -97,19 +97,7 @@ static struct coreboot_driver framebuffer_driver = { }, .tag = CB_TAG_FRAMEBUFFER, }; - -static int __init coreboot_framebuffer_init(void) -{ - return coreboot_driver_register(&framebuffer_driver); -} - -static void coreboot_framebuffer_exit(void) -{ - coreboot_driver_unregister(&framebuffer_driver); -} - -module_init(coreboot_framebuffer_init); -module_exit(coreboot_framebuffer_exit); +module_coreboot_driver(framebuffer_driver); MODULE_AUTHOR("Samuel Holland <[email protected]>"); MODULE_LICENSE("GPL"); |
