]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerLuis Henriques <luis.henriques@canonical.com>
Wed, 30 Sep 2015 12:20:51 +0000 (13:20 +0100)
commit bd1a05ee98b06c9a20138c45f96ccfddf3163f93 upstream.

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>
[ luis: backported to 3.16:
  - fixed_phy_add() only has 3 parameters in 3.16 kernel ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/net/phy/fixed.c

index d60d875cb4450ab6cf72114c35b4c816e2e031fd..5ea82da50cebe440712a2539e07c961a268556ad 100644 (file)
@@ -240,7 +240,7 @@ int 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);
+       ret = fixed_phy_add(irq, phy_addr, status);
        if (ret < 0)
                return ret;