Message ID | 20210124174331.3462226-4-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | smbios: Enhancements for more flexibility | expand |
On Mon, Jan 25, 2021 at 1:51 AM Simon Glass <sjg@chromium.org> wrote: > > These ops are missing at present which is not permitted. Add an empty > operation struct. > > Note: If the uclass requires operations then the drivers should provide > them. Otherwise, checking for missing operations must be done in every > uclass operation, so it adds to code size. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v3: > - Expand commit to explain why operations are required > > Changes in v2: > - Add new patch to fix crash on coral > > board/google/chromebook_coral/coral.c | 5 +++++ > 1 file changed, 5 insertions(+) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/board/google/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c index 34b2c2ac5d5..f9fb3f163f0 100644 --- a/board/google/chromebook_coral/coral.c +++ b/board/google/chromebook_coral/coral.c @@ -8,6 +8,7 @@ #include <command.h> #include <dm.h> #include <log.h> +#include <sysinfo.h> #include <acpi/acpigen.h> #include <asm-generic/gpio.h> #include <asm/acpi_nhlt.h> @@ -143,6 +144,9 @@ struct acpi_ops coral_acpi_ops = { .inject_dsdt = chromeos_acpi_gpio_generate, }; +struct sysinfo_ops coral_sysinfo_ops = { +}; + #if !CONFIG_IS_ENABLED(OF_PLATDATA) static const struct udevice_id coral_ids[] = { { .compatible = "google,coral" }, @@ -154,5 +158,6 @@ U_BOOT_DRIVER(coral_drv) = { .name = "coral", .id = UCLASS_SYSINFO, .of_match = of_match_ptr(coral_ids), + .ops = &coral_sysinfo_ops, ACPI_OPS_PTR(&coral_acpi_ops) };
These ops are missing at present which is not permitted. Add an empty operation struct. Note: If the uclass requires operations then the drivers should provide them. Otherwise, checking for missing operations must be done in every uclass operation, so it adds to code size. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v3: - Expand commit to explain why operations are required Changes in v2: - Add new patch to fix crash on coral board/google/chromebook_coral/coral.c | 5 +++++ 1 file changed, 5 insertions(+)