On Thu, Feb 25, 2021 at 4:47 PM <jack.yu@xxxxxxxxxxx> wrote: > static struct platform_driver rt1015p_platform_driver = { > .driver = { > .name = "rt1015p", > .of_match_table = of_match_ptr(rt1015p_device_id), > +#ifdef CONFIG_ACPI > + .acpi_match_table = ACPI_PTR(rt1015p_acpi_match), > +#endif You don't need the guard because ACPI_PTR() returns NULL if CONFIG_ACPI is not defined.