[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 06/13] Fix usage of INIT_WORK.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- drivers/xen/pciback/pciback.h | 4 ++-- drivers/xen/pciback/pciback_ops.c | 7 ++++--- drivers/xen/pciback/xenbus.c | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/xen/pciback/pciback.h b/drivers/xen/pciback/pciback.h index 27d0b2f..e8cfe74 100644 --- a/drivers/xen/pciback/pciback.h +++ b/drivers/xen/pciback/pciback.h @@ -99,8 +99,8 @@ int pciback_publish_pci_roots(struct pciback_device *pdev, void pciback_release_devices(struct pciback_device *pdev); /* Handles events from front-end */ -irqreturn_t pciback_handle_event(int irq, void *dev_id, struct pt_regs *regs); -void pciback_do_op(void *data); +irqreturn_t pciback_handle_event(int irq, void *dev_id); +void pciback_do_op(struct work_struct *data); int pciback_xenbus_register(void); void pciback_xenbus_unregister(void); diff --git a/drivers/xen/pciback/pciback_ops.c b/drivers/xen/pciback/pciback_ops.c index 5bc68b2..834663d 100644 --- a/drivers/xen/pciback/pciback_ops.c +++ b/drivers/xen/pciback/pciback_ops.c @@ -66,9 +66,10 @@ void test_and_schedule_op(struct pciback_device *pdev) * context because some of the pci_* functions can sleep (mostly due to ACPI * use of semaphores). This function is intended to be called from a work * queue in process context taking a struct pciback_device as a parameter */ -void pciback_do_op(void *data) + +void pciback_do_op(struct work_struct *data) { - struct pciback_device *pdev = data; + struct pciback_device *pdev = container_of(data, struct pciback_device, op_work); struct pci_dev *dev; struct xen_pci_op *op = &pdev->sh_info->op; @@ -109,7 +110,7 @@ void pciback_do_op(void *data) test_and_schedule_op(pdev); } -irqreturn_t pciback_handle_event(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t pciback_handle_event(int irq, void *dev_id) { struct pciback_device *pdev = dev_id; diff --git a/drivers/xen/pciback/xenbus.c b/drivers/xen/pciback/xenbus.c index bbca3fe..bd52289 100644 --- a/drivers/xen/pciback/xenbus.c +++ b/drivers/xen/pciback/xenbus.c @@ -9,6 +9,7 @@ #include <linux/vmalloc.h> #include <xen/xenbus.h> #include <xen/events.h> +#include <linux/workqueue.h> #include "pciback.h" #define INVALID_EVTCHN_IRQ (-1) @@ -33,7 +34,7 @@ static struct pciback_device *alloc_pdev(struct xenbus_device *xdev) pdev->evtchn_irq = INVALID_EVTCHN_IRQ; pdev->be_watching = 0; - INIT_WORK(&pdev->op_work, pciback_do_op, pdev); + INIT_WORK(&pdev->op_work, pciback_do_op); if (pciback_init_devices(pdev)) { kfree(pdev); -- 1.6.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |