mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
media: platform: stm32: use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
2b64bcb76a
commit
35dac920f7
1 changed files with 1 additions and 4 deletions
|
@ -603,7 +603,6 @@ static int dma2d_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct dma2d_dev *dev;
|
struct dma2d_dev *dev;
|
||||||
struct video_device *vfd;
|
struct video_device *vfd;
|
||||||
struct resource *res;
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
|
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
|
||||||
|
@ -614,9 +613,7 @@ static int dma2d_probe(struct platform_device *pdev)
|
||||||
mutex_init(&dev->mutex);
|
mutex_init(&dev->mutex);
|
||||||
atomic_set(&dev->num_inst, 0);
|
atomic_set(&dev->num_inst, 0);
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
dev->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
|
||||||
|
|
||||||
dev->regs = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(dev->regs))
|
if (IS_ERR(dev->regs))
|
||||||
return PTR_ERR(dev->regs);
|
return PTR_ERR(dev->regs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue