mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
drm/etnaviv: Use devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
parent
6eae41fea7
commit
facb180d3a
1 changed files with 1 additions and 3 deletions
|
|
@ -1716,7 +1716,6 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct etnaviv_gpu *gpu;
|
||||
struct resource *res;
|
||||
int err;
|
||||
|
||||
gpu = devm_kzalloc(dev, sizeof(*gpu), GFP_KERNEL);
|
||||
|
|
@ -1728,8 +1727,7 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
|
|||
mutex_init(&gpu->fence_lock);
|
||||
|
||||
/* Map registers: */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
gpu->mmio = devm_ioremap_resource(&pdev->dev, res);
|
||||
gpu->mmio = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(gpu->mmio))
|
||||
return PTR_ERR(gpu->mmio);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue