[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 13/31] Fix uage of INIT_WORK.



Modern kernels only require two arguments. Also update
the workqueue function with the right prototype.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pcifront/pci_op.c   |    4 ++--
 drivers/xen/pcifront/pcifront.h |    2 +-
 drivers/xen/pcifront/xenbus.c   |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/xen/pcifront/pci_op.c b/drivers/xen/pcifront/pci_op.c
index 725732f..fd47951 100644
--- a/drivers/xen/pcifront/pci_op.c
+++ b/drivers/xen/pcifront/pci_op.c
@@ -640,9 +640,9 @@ static pci_ers_result_t pcifront_common_process( int cmd, 
struct pcifront_device
 }
 
 
-void pcifront_do_aer(void *data)
+void pcifront_do_aer(struct work_struct *data)
 {
-       struct pcifront_device *pdev = data;
+       struct pcifront_device *pdev = container_of(data, struct 
pcifront_device, op_work);
        int cmd = pdev->sh_info->aer_op.cmd;
        pci_channel_state_t state = 
                (pci_channel_state_t)pdev->sh_info->aer_op.err;
diff --git a/drivers/xen/pcifront/pcifront.h b/drivers/xen/pcifront/pcifront.h
index d67ae95..82364c4 100644
--- a/drivers/xen/pcifront/pcifront.h
+++ b/drivers/xen/pcifront/pcifront.h
@@ -48,7 +48,7 @@ int pcifront_rescan_root(struct pcifront_device *pdev,
                         unsigned int domain, unsigned int bus);
 void pcifront_free_roots(struct pcifront_device *pdev);
 
-void pcifront_do_aer( void *data);
+void pcifront_do_aer(struct work_struct *data);
 
 irqreturn_t pcifront_handler_aer(int irq, void *dev);
 
diff --git a/drivers/xen/pcifront/xenbus.c b/drivers/xen/pcifront/xenbus.c
index 5e54696..4f34f87 100644
--- a/drivers/xen/pcifront/xenbus.c
+++ b/drivers/xen/pcifront/xenbus.c
@@ -50,7 +50,7 @@ static struct pcifront_device *alloc_pdev(struct 
xenbus_device *xdev)
        pdev->evtchn = INVALID_EVTCHN;
        pdev->gnt_ref = INVALID_GRANT_REF;
 
-       INIT_WORK(&pdev->op_work, pcifront_do_aer, pdev);
+       INIT_WORK(&pdev->op_work, pcifront_do_aer);
 
        dev_dbg(&xdev->dev, "Allocated pdev @ 0x%p pdev->sh_info @ 0x%p\n",
                pdev, pdev->sh_info);
-- 
1.6.2.5


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.