[PATCH 2/5] nvmem: Use already existing dev pointer in nvmem_register_cdev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's already a struct device_d * pointer variable. Use it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 drivers/nvmem/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 092e3b4f4a..122aac5990 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -97,7 +97,7 @@ static int nvmem_register_cdev(struct nvmem_device *nvmem, const char *name)
 
 	cdev->name = xstrdup(alias ?: name);
 	cdev->ops = &nvmem_chrdev_ops;
-	cdev->dev = &nvmem->dev;
+	cdev->dev = dev;
 	cdev->size = nvmem->size;
 
 	return devfs_create(cdev);
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux