* [PATCH] Remove multiple definitions of the to_dev() macro
@ 2009-08-25 20:36 Denis Kirjanov
0 siblings, 0 replies; only message in thread
From: Denis Kirjanov @ 2009-08-25 20:36 UTC (permalink / raw)
To: linux-kernel
Remove multiple definitions of the to_dev() macro
Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
---
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7ecb193..6fd7d16 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -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,
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 7376367..9493c88 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -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");
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 55bf34f..7d4101a 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -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))))
/*
diff --git a/include/linux/device.h b/include/linux/device.h
index aebb810..c2b4ac9 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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;
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index ee4820a..41ed613 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -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)))
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-25 20:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-25 20:36 [PATCH] Remove multiple definitions of the to_dev() macro Denis Kirjanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®