WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] netback: parent sysfs device should b

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] netback: parent sysfs device should be set before registering.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Mar 2009 08:40:04 -0700
Delivery-date: Tue, 17 Mar 2009 08:40:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1237299711 0
# Node ID 8b86d11a6eb39550304ab118dcade4902927a1c8
# Parent  e8a9f8910a3f113759906e493eaa211e2c43cd85
netback: parent sysfs device should be set before registering.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 drivers/xen/netback/common.h    |    2 +-
 drivers/xen/netback/interface.c |    4 +++-
 drivers/xen/netback/xenbus.c    |    3 +--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff -r e8a9f8910a3f -r 8b86d11a6eb3 drivers/xen/netback/common.h
--- a/drivers/xen/netback/common.h      Fri Mar 13 10:08:22 2009 +0000
+++ b/drivers/xen/netback/common.h      Tue Mar 17 14:21:51 2009 +0000
@@ -182,7 +182,7 @@ void netif_accel_init(void);
 
 void netif_disconnect(netif_t *netif);
 
-netif_t *netif_alloc(domid_t domid, unsigned int handle);
+netif_t *netif_alloc(struct device *parent, domid_t domid, unsigned int 
handle);
 int netif_map(netif_t *netif, unsigned long tx_ring_ref,
              unsigned long rx_ring_ref, unsigned int evtchn);
 
diff -r e8a9f8910a3f -r 8b86d11a6eb3 drivers/xen/netback/interface.c
--- a/drivers/xen/netback/interface.c   Fri Mar 13 10:08:22 2009 +0000
+++ b/drivers/xen/netback/interface.c   Tue Mar 17 14:21:51 2009 +0000
@@ -175,7 +175,7 @@ static struct ethtool_ops network_ethtoo
        .get_strings = netbk_get_strings,
 };
 
-netif_t *netif_alloc(domid_t domid, unsigned int handle)
+netif_t *netif_alloc(struct device *parent, domid_t domid, unsigned int handle)
 {
        int err = 0;
        struct net_device *dev;
@@ -188,6 +188,8 @@ netif_t *netif_alloc(domid_t domid, unsi
                DPRINTK("Could not create netif: out of memory\n");
                return ERR_PTR(-ENOMEM);
        }
+
+       SET_NETDEV_DEV(dev, parent);
 
        netif = netdev_priv(dev);
        memset(netif, 0, sizeof(*netif));
diff -r e8a9f8910a3f -r 8b86d11a6eb3 drivers/xen/netback/xenbus.c
--- a/drivers/xen/netback/xenbus.c      Fri Mar 13 10:08:22 2009 +0000
+++ b/drivers/xen/netback/xenbus.c      Tue Mar 17 14:21:51 2009 +0000
@@ -195,14 +195,13 @@ static void backend_create_netif(struct 
                return;
        }
 
-       be->netif = netif_alloc(dev->otherend_id, handle);
+       be->netif = netif_alloc(&dev->dev, dev->otherend_id, handle);
        if (IS_ERR(be->netif)) {
                err = PTR_ERR(be->netif);
                be->netif = NULL;
                xenbus_dev_fatal(dev, err, "creating interface");
                return;
        }
-       SET_NETDEV_DEV(be->netif->dev, &dev->dev);
 
        kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] netback: parent sysfs device should be set before registering., Xen patchbot-linux-2.6.18-xen <=