diff options
-rw-r--r-- | drivers/xen/xenbus/xenbus_client.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c index 0fa52916ad05..566d2adbd6ea 100644 --- a/drivers/xen/xenbus/xenbus_client.c +++ b/drivers/xen/xenbus/xenbus_client.c | |||
@@ -567,12 +567,10 @@ static int xenbus_map_ring_valloc_hvm(struct xenbus_device *dev, | |||
567 | int xenbus_map_ring(struct xenbus_device *dev, int gnt_ref, | 567 | int xenbus_map_ring(struct xenbus_device *dev, int gnt_ref, |
568 | grant_handle_t *handle, void *vaddr) | 568 | grant_handle_t *handle, void *vaddr) |
569 | { | 569 | { |
570 | struct gnttab_map_grant_ref op = { | 570 | struct gnttab_map_grant_ref op; |
571 | .host_addr = (unsigned long)vaddr, | 571 | |
572 | .flags = GNTMAP_host_map, | 572 | gnttab_set_map_op(&op, (phys_addr_t)vaddr, GNTMAP_host_map, gnt_ref, |
573 | .ref = gnt_ref, | 573 | dev->otherend_id); |
574 | .dom = dev->otherend_id, | ||
575 | }; | ||
576 | 574 | ||
577 | if (HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1)) | 575 | if (HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1)) |
578 | BUG(); | 576 | BUG(); |
@@ -698,10 +696,9 @@ static int xenbus_unmap_ring_vfree_hvm(struct xenbus_device *dev, void *vaddr) | |||
698 | int xenbus_unmap_ring(struct xenbus_device *dev, | 696 | int xenbus_unmap_ring(struct xenbus_device *dev, |
699 | grant_handle_t handle, void *vaddr) | 697 | grant_handle_t handle, void *vaddr) |
700 | { | 698 | { |
701 | struct gnttab_unmap_grant_ref op = { | 699 | struct gnttab_unmap_grant_ref op; |
702 | .host_addr = (unsigned long)vaddr, | 700 | |
703 | .handle = handle, | 701 | gnttab_set_unmap_op(&op, (phys_addr_t)vaddr, GNTMAP_host_map, handle); |
704 | }; | ||
705 | 702 | ||
706 | if (HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, &op, 1)) | 703 | if (HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, &op, 1)) |
707 | BUG(); | 704 | BUG(); |