From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxGnB-0003hF-Az for barebox@lists.infradead.org; Mon, 12 Aug 2019 20:19:46 +0000 Received: by mail-pg1-x542.google.com with SMTP id d1so17227519pgp.4 for ; Mon, 12 Aug 2019 13:19:44 -0700 (PDT) From: Andrey Smirnov Date: Mon, 12 Aug 2019 13:19:12 -0700 Message-Id: <20190812201915.12414-2-andrew.smirnov@gmail.com> In-Reply-To: <20190812201915.12414-1-andrew.smirnov@gmail.com> References: <20190812201915.12414-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/5] nvmem: Use already existing dev pointer in nvmem_register_cdev() To: barebox@lists.infradead.org Cc: Andrey Smirnov There's already a struct device_d * pointer variable. Use it. Signed-off-by: Andrey Smirnov --- 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@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox