aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bus/omap_l3_noc.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2014-04-11 13:04:01 -0400
committerNishanth Menon <nm@ti.com>2014-05-05 15:32:56 -0400
commitca6a34935c2c95482b901d76116f785ea356412c (patch)
tree466c7f6bd89db5e6679664d3aa43f751d34fd890 /drivers/bus/omap_l3_noc.c
parent73cecc46dd3c3fc3fdf906f4de1448a4279cb1e2 (diff)
bus: omap_l3_noc: populate l3->dev and use it
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 <nm@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Darren Etheridge <detheridge@ti.com> Tested-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'drivers/bus/omap_l3_noc.c')
-rw-r--r--drivers/bus/omap_l3_noc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 800486c88cc3..37d71b715053 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -131,6 +131,7 @@ static int omap_l3_probe(struct platform_device *pdev)
131 if (!l3) 131 if (!l3)
132 return -ENOMEM; 132 return -ENOMEM;
133 133
134 l3->dev = &pdev->dev;
134 platform_set_drvdata(pdev, l3); 135 platform_set_drvdata(pdev, l3);
135 136
136 /* Get mem resources */ 137 /* Get mem resources */
@@ -140,7 +141,7 @@ static int omap_l3_probe(struct platform_device *pdev)
140 141
141 l3->l3_base[i] = devm_ioremap_resource(&pdev->dev, res); 142 l3->l3_base[i] = devm_ioremap_resource(&pdev->dev, res);
142 if (IS_ERR(l3->l3_base[i])) { 143 if (IS_ERR(l3->l3_base[i])) {
143 dev_err(&pdev->dev, "ioremap %d failed\n", i); 144 dev_err(l3->dev, "ioremap %d failed\n", i);
144 return PTR_ERR(l3->l3_base[i]); 145 return PTR_ERR(l3->l3_base[i]);
145 } 146 }
146 } 147 }
@@ -149,19 +150,19 @@ static int omap_l3_probe(struct platform_device *pdev)
149 * Setup interrupt Handlers 150 * Setup interrupt Handlers
150 */ 151 */
151 l3->debug_irq = platform_get_irq(pdev, 0); 152 l3->debug_irq = platform_get_irq(pdev, 0);
152 ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler, 153 ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler,
153 IRQF_DISABLED, "l3-dbg-irq", l3); 154 IRQF_DISABLED, "l3-dbg-irq", l3);
154 if (ret) { 155 if (ret) {
155 dev_err(&pdev->dev, "request_irq failed for %d\n", 156 dev_err(l3->dev, "request_irq failed for %d\n",
156 l3->debug_irq); 157 l3->debug_irq);
157 return ret; 158 return ret;
158 } 159 }
159 160
160 l3->app_irq = platform_get_irq(pdev, 1); 161 l3->app_irq = platform_get_irq(pdev, 1);
161 ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler, 162 ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler,
162 IRQF_DISABLED, "l3-app-irq", l3); 163 IRQF_DISABLED, "l3-app-irq", l3);
163 if (ret) 164 if (ret)
164 dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq); 165 dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq);
165 166
166 return ret; 167 return ret;
167} 168}