diff options
author | Pavel Roskin | 2011-06-29 15:47:15 -0500 |
---|---|---|
committer | Luis R. Rodriguez | 2011-06-30 15:11:35 -0500 |
commit | 2204419d9ce529b16f22207810065e78b53b029e (patch) | |
tree | 6f63b19f3889d81ea485f1a12c6047e00c7786bb | |
parent | 50d796c448e6b1d95aa1a6e14b332890ad224305 (diff) | |
download | compat-2204419d9ce529b16f22207810065e78b53b029e.tar.gz compat-2204419d9ce529b16f22207810065e78b53b029e.tar.xz compat-2204419d9ce529b16f22207810065e78b53b029e.zip |
Signed-off-by: Pavel Roskin <proski@gnu.org>
Debian backports netdev_name as a function. As we cannot test if a
function is present, use an equivalent macro.
Reported by Sivaraman V <krusna@gmail.com> and Alex <alex9434@gmail.com>
-rw-r--r-- | include/linux/compat-2.6.34.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/compat-2.6.34.h b/include/linux/compat-2.6.34.h index 9743d6c..bada700 100644 --- a/include/linux/compat-2.6.34.h +++ b/include/linux/compat-2.6.34.h | |||
@@ -20,12 +20,11 @@ | |||
20 | 20 | ||
21 | /* netdev_printk helpers, similar to dev_printk */ | 21 | /* netdev_printk helpers, similar to dev_printk */ |
22 | 22 | ||
23 | static inline const char *netdev_name(const struct net_device *dev) | 23 | #ifndef netdev_name |
24 | { | 24 | #define netdev_name(__dev) \ |
25 | if (dev->reg_state != NETREG_REGISTERED) | 25 | ((__dev->reg_state != NETREG_REGISTERED) ? \ |
26 | return "(unregistered net_device)"; | 26 | "(unregistered net_device)" : __dev->name) |
27 | return dev->name; | 27 | #endif |
28 | } | ||
29 | 28 | ||
30 | #define netdev_printk(level, netdev, format, args...) \ | 29 | #define netdev_printk(level, netdev, format, args...) \ |
31 | dev_printk(level, (netdev)->dev.parent, \ | 30 | dev_printk(level, (netdev)->dev.parent, \ |