Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934175AbdCWNU7 (ORCPT ); Thu, 23 Mar 2017 09:20:59 -0400 Received: from mail2.skidata.com ([91.230.2.91]:9520 "EHLO mail2.skidata.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932304AbdCWNU6 (ORCPT ); Thu, 23 Mar 2017 09:20:58 -0400 Authentication-Results: mail2.skidata.com; spf=None smtp.pra=richard.leitner@skidata.com; spf=PermError smtp.mailfrom=Richard.Leitner@skidata.com; spf=None smtp.helo=postmaster@sdmr1srv.skidata.net X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HOAQCgytNY/0oKEKxdhW0Hn0eTKoIPg?= =?us-ascii?q?g6GIoNUGAECAQEBAQEBAQOBEIVDUiiBFg4FtnU6JgKKFAEBCAImCQGGRIkTfIU?= =?us-ascii?q?ZBZxVggWQR4puhj0Ck2IfgT0SEhEFH4cvdIdMgTCBDQEBAQ?= X-IPAS-Result: =?us-ascii?q?A2HOAQCgytNY/0oKEKxdhW0Hn0eTKoIPgg6GIoNUGAECAQE?= =?us-ascii?q?BAQEBAQOBEIVDUiiBFg4FtnU6JgKKFAEBCAImCQGGRIkTfIUZBZxVggWQR4puh?= =?us-ascii?q?j0Ck2IfgT0SEhEFH4cvdIdMgTCBDQEBAQ?= X-IronPort-AV: E=Sophos;i="5.36,210,1486422000"; d="scan'208";a="490522" From: Richard Leitner To: CC: , , , Richard Leitner Subject: [PATCH] nvmem: imx-ocotp: fix usage of "dev" pointers Date: Thu, 23 Mar 2017 14:20:37 +0100 Message-ID: <1490275237-28738-1-git-send-email-richard.leitner@skidata.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.60.30] X-ClientProxiedBy: sdex1srv.skidata.net (172.16.10.92) To sdex1srv.skidata.net (172.16.10.92) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 963 Lines: 31 Assign the correct dev pointer to struct ocotp_priv during probe. This is needed to display dev_* messages correctly. Furthermore harmonize the usage of dev (instead of &pdev->dev) in the probe function. Signed-off-by: Richard Leitner --- drivers/nvmem/imx-ocotp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index b8ca1e6..549177d 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -90,12 +90,14 @@ static int imx_ocotp_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; + priv->dev = dev; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); priv->base = devm_ioremap_resource(dev, res); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); - priv->clk = devm_clk_get(&pdev->dev, NULL); + priv->clk = devm_clk_get(dev, NULL); if (IS_ERR(priv->clk)) return PTR_ERR(priv->clk); -- 2.1.4