mcs814x: use devm_request_and_ioremap in mcs814x-rng driver
Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 36063
This commit is contained in:
parent
8ed2299646
commit
9cef30a519
1 changed files with 1 additions and 8 deletions
|
@ -61,14 +61,7 @@ static int mcs814x_rng_probe(struct platform_device *pdev)
|
||||||
rng->name = pdev->name;
|
rng->name = pdev->name;
|
||||||
rng->data_read = mcs814x_rng_data_read;
|
rng->data_read = mcs814x_rng_data_read;
|
||||||
|
|
||||||
if (!devm_request_mem_region(&pdev->dev,
|
priv->regs = devm_request_and_ioremap(&pdev->dev, res);
|
||||||
res->start, resource_size(res),
|
|
||||||
pdev->name)) {
|
|
||||||
ret = -EBUSY;
|
|
||||||
goto out_rng;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
|
|
||||||
if (!priv->regs) {
|
if (!priv->regs) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto out_rng;
|
goto out_rng;
|
||||||
|
|
Loading…
Reference in a new issue