Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
[firefly-linux-kernel-4.4.55.git] / drivers / char / tpm / xen-tpmfront.c
index c3b4f5a5ac107542ad7226c09662cde492b56765..3111f2778079dd49c0f8514d7852c06688a6c4f5 100644 (file)
@@ -193,6 +193,7 @@ static int setup_ring(struct xenbus_device *dev, struct tpm_private *priv)
        struct xenbus_transaction xbt;
        const char *message = NULL;
        int rv;
+       grant_ref_t gref;
 
        priv->shr = (void *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
        if (!priv->shr) {
@@ -200,11 +201,11 @@ static int setup_ring(struct xenbus_device *dev, struct tpm_private *priv)
                return -ENOMEM;
        }
 
-       rv = xenbus_grant_ring(dev, virt_to_mfn(priv->shr));
+       rv = xenbus_grant_ring(dev, &priv->shr, 1, &gref);
        if (rv < 0)
                return rv;
 
-       priv->ring_ref = rv;
+       priv->ring_ref = gref;
 
        rv = xenbus_alloc_evtchn(dev, &priv->evtchn);
        if (rv)