net: dsa: ksz9477: drop of_match_ptr for ID table
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 11 Mar 2023 17:32:55 +0000 (18:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Mar 2023 08:11:01 +0000 (08:11 +0000)
The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).

  drivers/net/dsa/microchip/ksz9477_i2c.c:84:34: error: ‘ksz9477_dt_ids’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz9477_i2c.c

index e315f66..97a3172 100644 (file)
@@ -117,7 +117,7 @@ MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
 static struct i2c_driver ksz9477_i2c_driver = {
        .driver = {
                .name   = "ksz9477-switch",
-               .of_match_table = of_match_ptr(ksz9477_dt_ids),
+               .of_match_table = ksz9477_dt_ids,
        },
        .probe_new = ksz9477_i2c_probe,
        .remove = ksz9477_i2c_remove,