MODULE_IMPORT_NS(DMA_BUF);
 
-#ifndef GRANT_INVALID_REF
-/*
- * Note on usage of grant reference 0 as invalid grant reference:
- * grant reference 0 is valid, but never exposed to a driver,
- * because of the fact it is already in use/reserved by the PV console.
- */
-#define GRANT_INVALID_REF      0
-#endif
-
 struct gntdev_dmabuf {
        struct gntdev_dmabuf_priv *priv;
        struct dma_buf *dmabuf;
        int i;
 
        for (i = 0; i < count; i++)
-               if (refs[i] != GRANT_INVALID_REF)
+               if (refs[i] != INVALID_GRANT_REF)
                        gnttab_end_foreign_access(refs[i], 0UL);
 }
 
        gntdev_dmabuf->nr_pages = count;
 
        for (i = 0; i < count; i++)
-               gntdev_dmabuf->u.imp.refs[i] = GRANT_INVALID_REF;
+               gntdev_dmabuf->u.imp.refs[i] = INVALID_GRANT_REF;
 
        return gntdev_dmabuf;