From: Denis Kirjanov <kirjanov@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Remove multiple definitions of the to_dev() macro
Date: Wed, 26 Aug 2009 00:36:36 +0400 [thread overview]
Message-ID: <a872555b0908251336q2c4ee970qa12500d35d4e144e@mail.gmail.com> (raw)
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)))
/*
reply other threads:[~2009-08-25 20:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a872555b0908251336q2c4ee970qa12500d35d4e144e@mail.gmail.com \
--to=kirjanov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®