summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2017-03-31 14:44:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-08 17:51:48 +0200
commit4cefb74ada57c479e4f8b92d28008d35c1527e87 (patch)
treeb0fdb921b34070de7d69861f9747c6d83760483c /drivers/nvmem
parentnvmem: sunxi-sid: add support for H3's SID controller (diff)
downloadlinux-4cefb74ada57c479e4f8b92d28008d35c1527e87.tar.xz
linux-4cefb74ada57c479e4f8b92d28008d35c1527e87.zip
nvmem: imx-ocotp: fix usage of "dev" pointers
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 <richard.leitner@skidata.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/imx-ocotp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index b8ca1e677b01..549177dde41a 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);