mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
gpu: host1x: mipi: 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: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
c1aaee9438
commit
791b5ecece
1 changed files with 1 additions and 3 deletions
|
@ -501,7 +501,6 @@ static int tegra_mipi_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
const struct of_device_id *match;
|
const struct of_device_id *match;
|
||||||
struct tegra_mipi *mipi;
|
struct tegra_mipi *mipi;
|
||||||
struct resource *res;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
match = of_match_node(tegra_mipi_of_match, pdev->dev.of_node);
|
match = of_match_node(tegra_mipi_of_match, pdev->dev.of_node);
|
||||||
|
@ -515,8 +514,7 @@ static int tegra_mipi_probe(struct platform_device *pdev)
|
||||||
mipi->soc = match->data;
|
mipi->soc = match->data;
|
||||||
mipi->dev = &pdev->dev;
|
mipi->dev = &pdev->dev;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
mipi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
|
||||||
mipi->regs = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(mipi->regs))
|
if (IS_ERR(mipi->regs))
|
||||||
return PTR_ERR(mipi->regs);
|
return PTR_ERR(mipi->regs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue