[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPTae5Kk+nw-thVDEy_ASge9H3MWQU7spDvZ1tx_1DAtdZe+rA@mail.gmail.com>
Date: Wed, 9 Jul 2025 16:06:34 -0700
From: Badhri Jagan Sridharan <badhri@...gle.com>
To: André Draszik <andre.draszik@...aro.org>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Amit Sunil Dhamne <amitsd@...gle.com>,
Peter Griffin <peter.griffin@...aro.org>, Tudor Ambarus <tudor.ambarus@...aro.org>,
Will McVicker <willmcvicker@...gle.com>, kernel-team@...roid.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] usb: typec: tcpm/tcpci_maxim: drop CONFIG_OF
On Mon, Jul 7, 2025 at 3:50 AM André Draszik <andre.draszik@...aro.org> wrote:
>
> The general recommendation is to not use of_match_ptr() or CONFIG_OF
> ifdef.
>
> Drop them.
>
> Signed-off-by: André Draszik <andre.draszik@...aro.org>
Reviewed-by: Badhri Jagan Sridharan <badhri@...gle.com>
> ---
> drivers/usb/typec/tcpm/tcpci_maxim_core.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim_core.c b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> index ff3604be79da73ca5acff7b5b2434c116ed12ef8..43b0ec2d12ba6d4c1cfccbfd355af3e5d9ce1385 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> @@ -563,18 +563,16 @@ static const struct i2c_device_id max_tcpci_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, max_tcpci_id);
>
> -#ifdef CONFIG_OF
> static const struct of_device_id max_tcpci_of_match[] = {
> { .compatible = "maxim,max33359", },
> {},
> };
> MODULE_DEVICE_TABLE(of, max_tcpci_of_match);
> -#endif
>
> static struct i2c_driver max_tcpci_i2c_driver = {
> .driver = {
> .name = "maxtcpc",
> - .of_match_table = of_match_ptr(max_tcpci_of_match),
> + .of_match_table = max_tcpci_of_match,
> .pm = &max_tcpci_pm_ops,
> },
> .probe = max_tcpci_probe,
>
> --
> 2.50.0.727.gbf7dc18ff4-goog
>
Powered by blists - more mailing lists