lkml.org 
[lkml]   [2022]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 3/3] platform/chrome: cros_ec_uart: Add DT enumeration support
On Thu, Nov 17, 2022 at 11:48:48AM -0700, Mark Hasemeyer wrote:
> @@ -392,6 +393,12 @@ static int __maybe_unused cros_ec_uart_resume(struct device *dev)
> static SIMPLE_DEV_PM_OPS(cros_ec_uart_pm_ops, cros_ec_uart_suspend,
> cros_ec_uart_resume);
>
> +static const struct of_device_id cros_ec_uart_of_match[] = {
> + { .compatible = "google,cros-ec-uart" },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, cros_ec_uart_of_match);

It would need a guard for checking CONFIG_OF. Similar to what
`cros_ec_uart_acpi_id` does.

> @@ -405,6 +412,7 @@ static struct serdev_device_driver cros_ec_uart_driver = {
> .driver = {
> .name = "cros-ec-uart",
> .acpi_match_table = ACPI_PTR(cros_ec_uart_acpi_id),
> + .of_match_table = cros_ec_uart_of_match,

It would need be wrapped by `of_match_ptr()`. Similar to what
`ACPI_PTR()` does.

\
 
 \ /
  Last update: 2022-11-18 06:44    [W:0.111 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site