Skip to content

Commit

Permalink
w1: mxc_w1: Convert to devm_ioremap_resource()
Browse files Browse the repository at this point in the history
According to Documentation/driver-model/devres.txt:

  devm_request_and_ioremap() : obsoleted by devm_ioremap_resource()

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Fabio Estevam authored and gregkh committed Mar 12, 2013
1 parent f6161aa commit 388f7bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/w1/masters/mxc_w1.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ static int mxc_w1_probe(struct platform_device *pdev)
mdev->clkdiv = (clk_get_rate(mdev->clk) / 1000000) - 1;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mdev->regs = devm_request_and_ioremap(&pdev->dev, res);
if (!mdev->regs)
return -EBUSY;
mdev->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(mdev->regs))
return PTR_ERR(mdev->regs);

clk_prepare_enable(mdev->clk);
__raw_writeb(mdev->clkdiv, mdev->regs + MXC_W1_TIME_DIVIDER);
Expand Down

0 comments on commit 388f7bd

Please sign in to comment.