[media] sh_veu.c: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
8efdb13543
commit
f2b4dc1a0f
|
@ -10,6 +10,7 @@
|
||||||
* published by the Free Software Foundation
|
* published by the Free Software Foundation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/err.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
@ -1164,9 +1165,9 @@ static int sh_veu_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
veu->is_2h = resource_size(reg_res) == 0x22c;
|
veu->is_2h = resource_size(reg_res) == 0x22c;
|
||||||
|
|
||||||
veu->base = devm_request_and_ioremap(&pdev->dev, reg_res);
|
veu->base = devm_ioremap_resource(&pdev->dev, reg_res);
|
||||||
if (!veu->base)
|
if (IS_ERR(veu->base))
|
||||||
return -ENOMEM;
|
return PTR_ERR(veu->base);
|
||||||
|
|
||||||
ret = devm_request_threaded_irq(&pdev->dev, irq, sh_veu_isr, sh_veu_bh,
|
ret = devm_request_threaded_irq(&pdev->dev, irq, sh_veu_isr, sh_veu_bh,
|
||||||
0, "veu", veu);
|
0, "veu", veu);
|
||||||
|
|
Loading…
Reference in a new issue