mcs814x: use devm_request_and_ioremap in mcs814x-rng driver
authorFlorian Fainelli <florian@openwrt.org>
Sun, 17 Mar 2013 14:33:18 +0000 (14:33 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 17 Mar 2013 14:33:18 +0000 (14:33 +0000)
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 36063

target/linux/mcs814x/files-3.3/drivers/char/hw_random/mcs814x-rng.c

index b1e95810dd24b07cd5705315bebd84387b44cffa..5e3d8f2479a5c42e02f30a780a4f26f48b0361cf 100644 (file)
@@ -61,14 +61,7 @@ static int mcs814x_rng_probe(struct platform_device *pdev)
        rng->name = pdev->name;
        rng->data_read = mcs814x_rng_data_read;
 
-       if (!devm_request_mem_region(&pdev->dev,
-                               res->start, resource_size(res),
-                               pdev->name)) {
-               ret = -EBUSY;
-               goto out_rng;
-       }
-
-       priv->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
+       priv->regs = devm_request_and_ioremap(&pdev->dev, res);
        if (!priv->regs) {
                ret = -ENOMEM;
                goto out_rng;