Skip to contentSkip to conversation

Remove multiple definitions of the to_dev() macro

PATCH New Denis Kirjanov 1 participant 1 message Aug 25, 2009

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove multiple definitions of the to_dev() macro

Remove multiple definitions of the to_dev() macro

---

drivers/base/core.c +0 -1
index 7ecb193..6fd7d16 100644
@@ -62,7 +62,6 @@ const char *dev_driver_string(const struct device *dev)
 }
 EXPORT_SYMBOL(dev_driver_string);
 
-#define to_dev(obj) container_of(obj, struct device, kobj)
 #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
 
 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
drivers/base/firmware_class.c +0 -2
index 7376367..9493c88 100644
@@ -21,8 +21,6 @@
 #include <linux/firmware.h>
 #include "base.h"
 
-#define to_dev(obj) container_of(obj, struct device, kobj)
-
 MODULE_AUTHOR("Manuel Estrada Sainz");
 MODULE_DESCRIPTION("Multi purpose firmware loading support");
 MODULE_LICENSE("GPL");
drivers/net/bonding/bond_sysfs.c +0 -1
index 55bf34f..7d4101a 100644
@@ -38,7 +38,6 @@
 
 #include "bonding.h"
 
-#define to_dev(obj)	container_of(obj, struct device, kobj)
 #define to_bond(cd)	((struct bonding *)(netdev_priv(to_net_dev(cd))))
 
 /*
include/linux/device.h +1 -0
index aebb810..c2b4ac9 100644
@@ -364,6 +364,7 @@ struct device_dma_parameters {
 	unsigned long segment_boundary_mask;
 };
 
+#define to_dev(obj) container_of(obj, struct device, kobj)
 struct device {
 	struct device		*parent;
 
net/bridge/br_sysfs_br.c +1 -1
index ee4820a..41ed613 100644
@@ -18,10 +18,10 @@
 #include <linux/rtnetlink.h>
 #include <linux/spinlock.h>
 #include <linux/times.h>
+#include <linux/device.h>
 
 #include "br_private.h"
 
-#define to_dev(obj)	container_of(obj, struct device, kobj)
 #define to_bridge(cd)	((struct net_bridge *)netdev_priv(to_net_dev(cd)))
 
 /*