]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
usb: typec: tcpm/tcpci_maxim: drop CONFIG_OF
authorAndré Draszik <andre.draszik@linaro.org>
Mon, 7 Jul 2025 10:50:28 +0000 (11:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jul 2025 17:49:57 +0000 (19:49 +0200)
The general recommendation is to not use of_match_ptr() or CONFIG_OF
ifdef.

Drop them.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20250707-max77759-irq-wake-v1-2-d367f633e4bc@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpci_maxim_core.c

index ff3604be79da73ca5acff7b5b2434c116ed12ef8..43b0ec2d12ba6d4c1cfccbfd355af3e5d9ce1385 100644 (file)
@@ -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,