Skip to content

Commit

Permalink
bus: omap_l3_noc: populate l3->dev and use it
Browse files Browse the repository at this point in the history
l3->dev is not populated, so populate it and use it to print information
relevant to the device instead of using a generic pr_*.

Signed-off-by: Nishanth Menon <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Acked-by: Peter Ujfalusi <[email protected]>
Tested-by: Darren Etheridge <[email protected]>
Tested-by: Sekhar Nori <[email protected]>
  • Loading branch information
nmenon committed May 5, 2014
1 parent 73cecc4 commit ca6a349
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/bus/omap_l3_noc.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ static int omap_l3_probe(struct platform_device *pdev)
if (!l3)
return -ENOMEM;

l3->dev = &pdev->dev;
platform_set_drvdata(pdev, l3);

/* Get mem resources */
Expand All @@ -140,7 +141,7 @@ static int omap_l3_probe(struct platform_device *pdev)

l3->l3_base[i] = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(l3->l3_base[i])) {
dev_err(&pdev->dev, "ioremap %d failed\n", i);
dev_err(l3->dev, "ioremap %d failed\n", i);
return PTR_ERR(l3->l3_base[i]);
}
}
Expand All @@ -149,19 +150,19 @@ static int omap_l3_probe(struct platform_device *pdev)
* Setup interrupt Handlers
*/
l3->debug_irq = platform_get_irq(pdev, 0);
ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler,
IRQF_DISABLED, "l3-dbg-irq", l3);
if (ret) {
dev_err(&pdev->dev, "request_irq failed for %d\n",
dev_err(l3->dev, "request_irq failed for %d\n",
l3->debug_irq);
return ret;
}

l3->app_irq = platform_get_irq(pdev, 1);
ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler,
IRQF_DISABLED, "l3-app-irq", l3);
if (ret)
dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq);
dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq);

return ret;
}
Expand Down

0 comments on commit ca6a349

Please sign in to comment.