net: sfp: rename gpio_of_names[]
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 18 Jan 2023 10:21:08 +0000 (10:21 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 Jan 2023 02:55:30 +0000 (18:55 -0800)
There's nothing DT specific about the gpio_of_names array, let's drop
the _of infix.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/sfp.c

index 402dcdd59acb7bce937ba52a8220522dd85567b2..64dfc5f1ea7be95829ef168552018ebbce960f5b 100644 (file)
@@ -144,7 +144,7 @@ static const char *sm_state_to_str(unsigned short sm_state)
        return sm_state_strings[sm_state];
 }
 
-static const char *gpio_of_names[] = {
+static const char *gpio_names[] = {
        "mod-def0",
        "los",
        "tx-fault",
@@ -2563,7 +2563,7 @@ static void sfp_check_state(struct sfp *sfp)
 
        for (i = 0; i < GPIO_MAX; i++)
                if (changed & BIT(i))
-                       dev_dbg(sfp->dev, "%s %u -> %u\n", gpio_of_names[i],
+                       dev_dbg(sfp->dev, "%s %u -> %u\n", gpio_names[i],
                                !!(sfp->state & BIT(i)), !!(state & BIT(i)));
 
        state |= sfp->state & (SFP_F_TX_DISABLE | SFP_F_RATE_SELECT);
@@ -2698,7 +2698,7 @@ static int sfp_probe(struct platform_device *pdev)
        for (i = 0; i < GPIO_MAX; i++)
                if (sff->gpios & BIT(i)) {
                        sfp->gpio[i] = devm_gpiod_get_optional(sfp->dev,
-                                          gpio_of_names[i], gpio_flags[i]);
+                                          gpio_names[i], gpio_flags[i]);
                        if (IS_ERR(sfp->gpio[i]))
                                return PTR_ERR(sfp->gpio[i]);
                }
@@ -2753,7 +2753,7 @@ static int sfp_probe(struct platform_device *pdev)
 
                sfp_irq_name = devm_kasprintf(sfp->dev, GFP_KERNEL,
                                              "%s-%s", dev_name(sfp->dev),
-                                             gpio_of_names[i]);
+                                             gpio_names[i]);
 
                if (!sfp_irq_name)
                        return -ENOMEM;