[PATCH 07/16] backports: fix header of phy_mii_ioctl()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On kernel versions < 2.6.36 phy_mii_ioctl() gets struct mii_ioctl_data
as second parameter and on more recent kernel versions it takes struct
ifreq. This patch converts one version to the other.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/phy.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/backport/backport-include/linux/phy.h b/backport/backport-include/linux/phy.h
index 4473e4e..ff2aacf 100644
--- a/backport/backport-include/linux/phy.h
+++ b/backport/backport-include/linux/phy.h
@@ -8,4 +8,14 @@
 	phy_connect(dev, bus_id, handler, 0, interface)
 #endif
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
+#include <linux/mii.h>
+static inline int backport_phy_mii_ioctl(struct phy_device *phydev,
+					 struct ifreq *ifr, int cmd)
+{
+	return phy_mii_ioctl(phydev, if_mii(ifr), cmd);
+}
+#define phy_mii_ioctl LINUX_BACKPORT(phy_mii_ioctl)
+#endif
+
 #endif /* __BACKPORT_LINUX_PHY_H */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux