Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297439 > unrolled thread

[PATCH 2/2] bridge: use kobj_to_dev instead of to_dev

Started byGeliang Tang <geliangtang@163.com>
First post2015-12-23 13:50 +0100
Last post2015-12-24 04:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] bridge: use kobj_to_dev instead of to_dev Geliang Tang <geliangtang@163.com> - 2015-12-23 13:50 +0100
    Re: [PATCH 2/2] bridge: use kobj_to_dev instead of to_dev David Miller <davem@davemloft.net> - 2015-12-24 04:30 +0100

#1297439 — [PATCH 2/2] bridge: use kobj_to_dev instead of to_dev

FromGeliang Tang <geliangtang@163.com>
Date2015-12-23 13:50 +0100
Subject[PATCH 2/2] bridge: use kobj_to_dev instead of to_dev
Message-ID<qIR1E-1bM-23@gated-at.bofh.it>
kobj_to_dev has been defined in linux/device.h, so I replace to_dev
with it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 net/bridge/br_sysfs_br.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index 8365bd5..6b80914 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -22,7 +22,6 @@
 
 #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)))
 
 /*
@@ -814,7 +813,7 @@ static ssize_t brforward_read(struct file *filp, struct kobject *kobj,
 			      struct bin_attribute *bin_attr,
 			      char *buf, loff_t off, size_t count)
 {
-	struct device *dev = to_dev(kobj);
+	struct device *dev = kobj_to_dev(kobj);
 	struct net_bridge *br = to_bridge(dev);
 	int n;
 
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1297741

FromDavid Miller <davem@davemloft.net>
Date2015-12-24 04:30 +0100
Message-ID<qJ4Lf-1uS-1@gated-at.bofh.it>
In reply to#1297439
From: Geliang Tang <geliangtang@163.com>
Date: Wed, 23 Dec 2015 20:42:21 +0800

> kobj_to_dev has been defined in linux/device.h, so I replace to_dev
> with it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web