summaryrefslogtreecommitdiff
path: root/target/linux/mcs814x
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-03-17 14:33:18 +0000
committerFlorian Fainelli <florian@openwrt.org>2013-03-17 14:33:18 +0000
commit9cef30a5197814e04aafc86bd22cf0e481a10472 (patch)
tree387ff2c725cee586bceabf2671e41deada265ac1 /target/linux/mcs814x
parent8ed2299646bec72d638e3e6dd11881216ebbbd3a (diff)
downloadmtk-20170518-9cef30a5197814e04aafc86bd22cf0e481a10472.zip
mtk-20170518-9cef30a5197814e04aafc86bd22cf0e481a10472.tar.gz
mtk-20170518-9cef30a5197814e04aafc86bd22cf0e481a10472.tar.bz2
mcs814x: use devm_request_and_ioremap in mcs814x-rng driver
Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 36063
Diffstat (limited to 'target/linux/mcs814x')
-rw-r--r--target/linux/mcs814x/files-3.3/drivers/char/hw_random/mcs814x-rng.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/target/linux/mcs814x/files-3.3/drivers/char/hw_random/mcs814x-rng.c b/target/linux/mcs814x/files-3.3/drivers/char/hw_random/mcs814x-rng.c
index b1e9581..5e3d8f2 100644
--- a/target/linux/mcs814x/files-3.3/drivers/char/hw_random/mcs814x-rng.c
+++ b/target/linux/mcs814x/files-3.3/drivers/char/hw_random/mcs814x-rng.c
@@ -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;