Commit 388f7bd2 authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

w1: mxc_w1: Convert to devm_ioremap_resource()

According to Documentation/driver-model/devres.txt:

  devm_request_and_ioremap() : obsoleted by devm_ioremap_resource()
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6161aa1
...@@ -121,9 +121,9 @@ static int mxc_w1_probe(struct platform_device *pdev) ...@@ -121,9 +121,9 @@ static int mxc_w1_probe(struct platform_device *pdev)
mdev->clkdiv = (clk_get_rate(mdev->clk) / 1000000) - 1; mdev->clkdiv = (clk_get_rate(mdev->clk) / 1000000) - 1;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mdev->regs = devm_request_and_ioremap(&pdev->dev, res); mdev->regs = devm_ioremap_resource(&pdev->dev, res);
if (!mdev->regs) if (IS_ERR(mdev->regs))
return -EBUSY; return PTR_ERR(mdev->regs);
clk_prepare_enable(mdev->clk); clk_prepare_enable(mdev->clk);
__raw_writeb(mdev->clkdiv, mdev->regs + MXC_W1_TIME_DIVIDER); __raw_writeb(mdev->clkdiv, mdev->regs + MXC_W1_TIME_DIVIDER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment