* [PATCH] bonding: set sysfs device_type to 'bond'
@ 2013-02-18 2:38 Doug Goldstein
2013-02-18 19:49 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Doug Goldstein @ 2013-02-18 2:38 UTC (permalink / raw)
To: netdev; +Cc: Jay Vosburgh, Andy Gospodarek, Doug Goldstein
Sets the sysfs device_type to 'bond' for udev. This allows udev rules to
be created for bond devices. This is similar to how other network
devices set their device_type.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
drivers/net/bonding/bond_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index b7d45f3..34a6e96 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4350,6 +4350,10 @@ static const struct net_device_ops bond_netdev_ops = {
.ndo_add_slave = bond_enslave,
.ndo_del_slave = bond_release,
.ndo_fix_features = bond_fix_features,
+};
+
+static const struct device_type bond_type = {
+ .name = "bond",
};
static void bond_destructor(struct net_device *bond_dev)
@@ -4382,6 +4386,8 @@ static void bond_setup(struct net_device *bond_dev)
bond_dev->destructor = bond_destructor;
+ SET_NETDEV_DEVTYPE(bond_dev, &bond_type);
+
/* Initialize the device options */
bond_dev->tx_queue_len = 0;
bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] bonding: set sysfs device_type to 'bond'
2013-02-18 2:38 [PATCH] bonding: set sysfs device_type to 'bond' Doug Goldstein
@ 2013-02-18 19:49 ` David Miller
2013-02-19 0:59 ` [PATCHv2] " Doug Goldstein
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2013-02-18 19:49 UTC (permalink / raw)
To: cardoe; +Cc: netdev, fubar, andy
From: Doug Goldstein <cardoe@cardoe.com>
Date: Sun, 17 Feb 2013 20:38:47 -0600
> @@ -4350,6 +4350,10 @@ static const struct net_device_ops bond_netdev_ops = {
> .ndo_add_slave = bond_enslave,
> .ndo_del_slave = bond_release,
> .ndo_fix_features = bond_fix_features,
> +};
^^
There is trailing whitespace there, please get rid of it.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCHv2] bonding: set sysfs device_type to 'bond'
2013-02-18 19:49 ` David Miller
@ 2013-02-19 0:59 ` Doug Goldstein
2013-02-19 5:53 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Doug Goldstein @ 2013-02-19 0:59 UTC (permalink / raw)
To: netdev; +Cc: Jay Vosburgh, Andy Gospodarek, David Miller, Doug Goldstein
Sets the sysfs device_type to 'bond' for udev. This allows udev rules to
be created for bond devices. This is similar to how other network
devices set their device_type.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
v2: removed accidental whitespace addition
---
drivers/net/bonding/bond_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index b7d45f3..876505f 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4352,6 +4352,10 @@ static const struct net_device_ops bond_netdev_ops = {
.ndo_fix_features = bond_fix_features,
};
+static const struct device_type bond_type = {
+ .name = "bond",
+};
+
static void bond_destructor(struct net_device *bond_dev)
{
struct bonding *bond = netdev_priv(bond_dev);
@@ -4382,6 +4386,8 @@ static void bond_setup(struct net_device *bond_dev)
bond_dev->destructor = bond_destructor;
+ SET_NETDEV_DEVTYPE(bond_dev, &bond_type);
+
/* Initialize the device options */
bond_dev->tx_queue_len = 0;
bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCHv2] bonding: set sysfs device_type to 'bond'
2013-02-19 0:59 ` [PATCHv2] " Doug Goldstein
@ 2013-02-19 5:53 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-02-19 5:53 UTC (permalink / raw)
To: cardoe; +Cc: netdev, fubar, andy
From: Doug Goldstein <cardoe@cardoe.com>
Date: Mon, 18 Feb 2013 18:59:23 -0600
> Sets the sysfs device_type to 'bond' for udev. This allows udev rules to
> be created for bond devices. This is similar to how other network
> devices set their device_type.
>
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-19 5:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 2:38 [PATCH] bonding: set sysfs device_type to 'bond' Doug Goldstein
2013-02-18 19:49 ` David Miller
2013-02-19 0:59 ` [PATCHv2] " Doug Goldstein
2013-02-19 5:53 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox