Re: [PATCH 1/5] firmware: google: Add a module_coreboot_driver() macro and use it

From: Brian Norris
Date: Mon May 13 2019 - 13:34:50 EST


On Fri, May 10, 2019 at 11:01:47AM -0700, Stephen Boyd wrote:
> --- a/drivers/firmware/google/coreboot_table.h
> +++ b/drivers/firmware/google/coreboot_table.h

> @@ -91,4 +92,13 @@ int coreboot_driver_register(struct coreboot_driver *driver);
> /* Unregister a driver that uses the data from a coreboot table. */
> void coreboot_driver_unregister(struct coreboot_driver *driver);
>
> +/* module_coreboot_driver() - Helper macro for drivers that don't do

Have you been writing too much net/ code recently? :) Or just copying
from platform_device.h I guess. Oh well.

Series looks fine to me.

Brian

> + * anything special in module init/exit. This eliminates a lot of
> + * boilerplate. Each module may only use this macro once, and
> + * calling it replaces module_init() and module_exit()
> + */
> +#define module_coreboot_driver(__coreboot_driver) \
> + module_driver(__coreboot_driver, coreboot_driver_register, \
> + coreboot_driver_unregister)
> +
> #endif /* __COREBOOT_TABLE_H */