fixed_phy: pass 'irq' to fixed_phy_add()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Thu, 3 Sep 2015 20:22:16 +0000 (23:22 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Sep 2015 06:49:33 +0000 (23:49 -0700)
I've noticed  that fixed_phy_register() ignores its 'irq' parameter instead of
passing it to fixed_phy_add(). Luckily, fixed_phy_register()  seems to  always
be  called with PHY_POLL  for 'irq'... :-)

Fixes: a75951217472 ("net: phy: extend fixed driver with fixed_phy_register()")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/fixed_phy.c

index 12c7eb2c604e15021b2f5fb78120004708fb22e8..fb1299c6326ec1f388d5c544e4607645274cbb08 100644 (file)
@@ -325,7 +325,7 @@ struct phy_device *fixed_phy_register(unsigned int irq,
        phy_addr = phy_fixed_addr++;
        spin_unlock(&phy_fixed_addr_lock);
 
-       ret = fixed_phy_add(PHY_POLL, phy_addr, status, link_gpio);
+       ret = fixed_phy_add(irq, phy_addr, status, link_gpio);
        if (ret < 0)
                return ERR_PTR(ret);