From patchwork Fri Mar 31 12:44:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 96401 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp711116qgd; Fri, 31 Mar 2017 05:47:17 -0700 (PDT) X-Received: by 10.99.54.69 with SMTP id d66mr3133384pga.116.1490964437277; Fri, 31 Mar 2017 05:47:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i63si5146902pge.321.2017.03.31.05.47.17; Fri, 31 Mar 2017 05:47:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933408AbdCaMrE (ORCPT + 21 others); Fri, 31 Mar 2017 08:47:04 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:35898 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933269AbdCaMpW (ORCPT ); Fri, 31 Mar 2017 08:45:22 -0400 Received: by mail-wr0-f181.google.com with SMTP id w11so103533738wrc.3 for ; Fri, 31 Mar 2017 05:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5Gl6k0QbqJJfuUIOs/4Jeo33b1iEx/xZuLIDpGPfqjI=; b=a+lDdO7qTRWn7SzgPKDYDRAmTYw02UtUPs4WSHGDuMXd+VHabNyREAdHKlVaXbD2FQ 9zunH20dVq4YDCnbgLKJgyYJPTUNedxowhE8CTpN8aPPdi8G9zsCNJycwZpt7TXb6h7p YNYjgu3khCnoogZC7KBRgXHkNDDBelpFRx8pM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5Gl6k0QbqJJfuUIOs/4Jeo33b1iEx/xZuLIDpGPfqjI=; b=DwRK+7R6kiIWDIZDr2P9/j5Qn5Wb9gmmTKx+2bpCI75e40XjNr1r4vLudoFdzCBdmz B53EsT2fLusICQZhhHlYMXSbTg8TbTboIzd/i06IVpWMfyyXFCfNvWsUTLxEWBjG+0XN ji2wDazRtkTI0sC22Qkxa/bzMeM8/sX2Zar5iYfmnVALFCPt/fJbEfQPD1eGvK2WqiRS C4fktTJwOt/GT/SGVUIL9N/ZzCvz99YH0ReB1fNcFSNo8BTKx1u9euPR/aT7EOGb9pfz oVn6UW58X3w73aOoFFnjUQVLOaoHqCyo+evzV14F3g+3OSRipRlCgTZeZPuHLLFXGP0r 3u/w== X-Gm-Message-State: AFeK/H0D/GAmHViv4TsAV3rjHQxyj5cS340LI+sZBYI9e6L4KnwWKa/2eQAIV2wq/iRi7Ng3 X-Received: by 10.223.155.17 with SMTP id b17mr2680976wrc.181.1490964315678; Fri, 31 Mar 2017 05:45:15 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id n80sm6615514wrb.24.2017.03.31.05.45.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Mar 2017 05:45:15 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, maxime.ripard@free-electrons.com, Richard Leitner , Srinivas Kandagatla Subject: [PATCH 05/11] nvmem: imx-ocotp: fix usage of "dev" pointers Date: Fri, 31 Mar 2017 13:44:49 +0100 Message-Id: <1490964295-9647-6-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490964295-9647-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1490964295-9647-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Richard Leitner 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 Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/imx-ocotp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 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);