summaryrefslogtreecommitdiff
path: root/drivers/dax/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dax/bus.c')
-rw-r--r--drivers/dax/bus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index 0cff32102c4c..69aae2cbd45f 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2017-2018 Intel Corporation. All rights reserved. */
+#include <linux/memremap.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/dax.h>
@@ -206,7 +207,8 @@ static void unregister_dev_dax(void *dev)
put_device(dev);
}
-struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, int id)
+struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, int id,
+ struct dev_pagemap *pgmap)
{
struct device *parent = dax_region->dev;
struct dax_device *dax_dev;
@@ -222,6 +224,8 @@ struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, int id)
if (!dev_dax)
return ERR_PTR(-ENOMEM);
+ memcpy(&dev_dax->pgmap, pgmap, sizeof(*pgmap));
+
/*
* No 'host' or dax_operations since there is no access to this
* device outside of mmap of the resulting character device.