From 291c8560741b4fe0a9af81234316cd953cab2af6 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 4 Dec 2012 21:12:46 +0000 Subject: [PATCH] compat: rename MDIO exported symbols compat-drivers now has support for carrying over the MDIO module. To help it avoid clashes with already in place drivers that rely on the older MDIO module we rename the exported symbols of the shinier module with a compat_ prefix. An alternative to this strategy is to have compat-drivers work under a separate namespace but we have yet to receive patches for that, although we hear someone did it. Signed-off-by: Luis R. Rodriguez --- include/linux/compat-2.6.31.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/linux/compat-2.6.31.h b/include/linux/compat-2.6.31.h index 6e513ef9ca09..cfa34dfa9028 100644 --- a/include/linux/compat-2.6.31.h +++ b/include/linux/compat-2.6.31.h @@ -51,6 +51,30 @@ #endif #endif +/* + * These changes allow us to backport and forward port + * the driver/net/mdio module. What we do is simply + * rename the exported symbols to other symbols and + * rely on the fact that compat-drivers will take care + * of renaming that module. This allows in-place drivers + * to use the old module and have the newer supplied + * drivers through compat-drivers to use the new bacported + * module. + * + * XXX: maybe we should have a COMPAT_EXPORT_SYMBOL() that + * takes care of renaming the symbols with a compat_ prefix? + * There are other ideas of using a separate namespace for + * modules supplied by compat -- someone already did the work + * but never sent the patches ;) who are you out there ? + */ +#define mdio45_probe compat_mdio45_probe +#define mdio_set_flag compat_mdio_set_flag +#define mdio45_links_ok compat_mdio45_links_ok +#define mdio45_nway_restart compat_mdio45_nway_restart +#define mdio45_ethtool_gset_npage compat_mdio45_ethtool_gset_npage +#define mdio45_ethtool_spauseparam_an compat_mdio45_ethtool_spauseparam_an +#define mdio_mii_ioctl compat_mdio_mii_ioctl + #ifndef NETDEV_PRE_UP #define NETDEV_PRE_UP 0x000D #endif -- 2.30.2