--- initial
+++ final
@@ -1,98 +1,97 @@
 struct vio_dev *vio_register_device_node(struct device_node *of_node) {
   struct vio_dev *viodev;
   struct device_node *parent_node;
   const __be32 *prop;
   enum vio_dev_family family;
   const char *of_node_name = of_node->name ? of_node->name : "<unknown>";
   /*
    * Determine if this node is a under the /vdevice node or under the
    * /ibm,platform-facilities node.  This decides the device's family.
    */
   parent_node = of_get_parent(of_node);
   if (parent_node) {
     if (!strcmp(parent_node->full_name, "/ibm,platform-facilities"))
       family = PFO;
     else if (!strcmp(parent_node->full_name, "/vdevice"))
       family = VDEVICE;
     else {
       pr_warn("%s: parent(%s) of %s not recognized.\n", __func__, parent_node->full_name, of_node_name);
       of_node_put(parent_node);
       return NULL;
     }
     of_node_put(parent_node);
   } else {
     pr_warn("%s: could not determine the parent of node %s.\n", __func__, of_node_name);
     return NULL;
   }
   if (family == PFO) {
     if (of_get_property(of_node, "interrupt-controller", NULL)) {
       pr_debug("%s: Skipping the interrupt controller %s.\n", __func__, of_node_name);
       return NULL;
     }
   }
   /* allocate a vio_dev for this node */
   viodev = kzalloc(sizeof(struct vio_dev), GFP_KERNEL);
   if (viodev == NULL) {
     pr_warn("%s: allocation failure for VIO device.\n", __func__);
     return NULL;
   }
   /* we need the 'device_type' property, in order to match with drivers */
   viodev->family = family;
   if (viodev->family == VDEVICE) {
     unsigned int unit_address;
     if (of_node->type != NULL)
       viodev->type = of_node->type;
     else {
       pr_warn("%s: node %s is missing the 'device_type' "
               "property.\n",
               __func__, of_node_name);
       goto out;
     }
     prop = of_get_property(of_node, "reg", NULL);
     if (prop == NULL) {
       pr_warn("%s: node %s missing 'reg'\n", __func__, of_node_name);
       goto out;
     }
     unit_address = of_read_number(prop, 1);
     dev_set_name(&viodev->dev, "%x", unit_address);
     viodev->irq = irq_of_parse_and_map(of_node, 0);
     viodev->unit_address = unit_address;
   } else {
     /* PFO devices need their resource_id for submitting COP_OPs
      * This is an optional field for devices, but is required when
      * performing synchronous ops */
     prop = of_get_property(of_node, "ibm,resource-id", NULL);
     if (prop != NULL) viodev->resource_id = of_read_number(prop, 1);
     dev_set_name(&viodev->dev, "%s", of_node_name);
     viodev->type = of_node_name;
     viodev->irq = 0;
   }
   viodev->name = of_node->name;
   viodev->dev.of_node = of_node_get(of_node);
   set_dev_node(&viodev->dev, of_node_to_nid(of_node));
   /* init generic 'struct device' fields: */
   viodev->dev.parent = &vio_bus_device.dev;
   viodev->dev.bus = &vio_bus_type;
   viodev->dev.release = vio_dev_release;
   if (of_get_property(viodev->dev.of_node, "ibm,my-dma-window", NULL)) {
     if (firmware_has_feature(FW_FEATURE_CMO))
       vio_cmo_set_dma_ops(viodev);
     else
       set_dma_ops(&viodev->dev, &dma_iommu_ops);
     set_iommu_table_base(&viodev->dev, vio_build_iommu_table(viodev));
     /* needed to ensure proper operation of coherent allocations
      * later, in case driver doesn't set it explicitly */
-    dma_set_mask(&viodev->dev, DMA_BIT_MASK(64));
-    dma_set_coherent_mask(&viodev->dev, DMA_BIT_MASK(64));
+    dma_set_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64));
   }
   /* register with generic device framework */
   if (device_register(&viodev->dev)) {
     printk(KERN_ERR "%s: failed to register device %s\n", __func__, dev_name(&viodev->dev));
     put_device(&viodev->dev);
     return NULL;
   }
   return viodev;
 out: /* Use this exit point for any return prior to device_register */
   kfree(viodev);
   return NULL;
 }<sep>@@
expression e,v;
@@

-	dma_set_mask(e, v);
-       dma_set_coherent_mask(e, v);
+	dma_set_mask_and_coherent(e, v);