Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2044

kernel-2.6.18-238.el5.src.rpm

From: John Feeney <jfeeney@redhat.com>
Date: Fri, 3 Sep 2010 21:12:22 -0400
Subject: [misc] move dev_name to device.h
Message-id: <4C8164B6.5020008@redhat.com>
Patchwork-id: 28136
O-Subject: [RHEL5.6 PATCH 3/3] Move dev_name() to device.h
Bugzilla: 568551
RH-Acked-by: David S. Miller <davem@redhat.com>
RH-Acked-by: John Linville <linville@redhat.com>
RH-Acked-by: Andy Gospodarek <gospo@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>

This patch adds dev_name() to device.h and removes all compat-like
declarations. This is required for the I/O AT update.

Note that this completely removes net/wireless/compat.h because dev_name
was all that was there and the file did not compile if included.

Thanks to Prarit for providing this patch.

commit 21b8cd8f0d3cf1cef71f6804fdfcc5c861357fb9
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Fri Sep 3 13:22:44 2010 -0400

    Move dev_name() to include/linux/device.h

Signed-off-by: Jarod Wilson <jarod@redhat.com>

diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c
index 18c1424..44acde7 100644
--- a/drivers/pci/pcie/aer/aerdrv_errprint.c
+++ b/drivers/pci/pcie/aer/aerdrv_errprint.c
@@ -57,11 +57,6 @@
 	(e & AER_DATA_LINK_LAYER_ERROR_MASK(t)) ? AER_DATA_LINK_LAYER_ERROR : \
 	AER_TRANSACTION_LAYER_ERROR)
 
-static inline const char *dev_name(const struct device *dev)
-{
-	return kobject_name(&dev->kobj);
-}
-
 #define AER_PR(info, pdev, fmt, args...)				\
 	printk("%s%s %s: " fmt, (info->severity == AER_CORRECTABLE) ?	\
 		KERN_WARNING : KERN_ERR, dev_driver_string(&pdev->dev),	\
diff --git a/include/linux/device.h b/include/linux/device.h
index 774b167..f5affd8 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -402,6 +402,11 @@ struct device {
 	void	(*release)(struct device * dev);
 };
 
+static inline const char *dev_name(const struct device *dev)
+{
+	return kobject_name(&dev->kobj);
+}
+
 static inline void *
 dev_get_drvdata (struct device *dev)
 {
diff --git a/include/net/wireless_compat.h b/include/net/wireless_compat.h
index a762af2..b83c1b9 100644
--- a/include/net/wireless_compat.h
+++ b/include/net/wireless_compat.h
@@ -3,11 +3,6 @@
 
 #define BIT(nr)			(1UL << (nr))
 
-static inline const char *dev_name(const struct device *dev)
-{
-	return kobject_name(&dev->kobj);
-}
-
 extern int dev_set_name(struct device *dev, const char *fmt, ...);
 
 /*
diff --git a/net/wireless/compat.h b/net/wireless/compat.h
deleted file mode 100644
index ad2a827..0000000
--- a/net/wireless/compat.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __WIRELESS_COMPAT_H_
-#define __WIRELESS_COMPAT_H_
-
-static inline const char *dev_name(const struct device *dev)
-{
-	return kobject_name(&dev->kobj);
-}
-
-#endif /* _WIRELESS_COMPAT_H_ *?