diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2014-04-01 09:23:48 -0400 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2014-05-05 15:32:15 -0400 |
commit | a0ef78f353d6edc9f88d3247601f1dc5ad8f4b84 (patch) | |
tree | 6dba30eac54f61a1f05c07f7adc7ea18b149bef5 /drivers/bus | |
parent | 56c4a0224add82ced3af81c3a898a228a0560720 (diff) |
drivers: bus: omap_l3: Convert to use devm_request_irq()
With this we can remove the free_irq() calls from probe and remove.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/omap_l3_noc.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index 6f58be3c2f76..25bcb60be880 100644 --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c | |||
@@ -155,9 +155,8 @@ static int omap4_l3_probe(struct platform_device *pdev) | |||
155 | * Setup interrupt Handlers | 155 | * Setup interrupt Handlers |
156 | */ | 156 | */ |
157 | l3->debug_irq = platform_get_irq(pdev, 0); | 157 | l3->debug_irq = platform_get_irq(pdev, 0); |
158 | ret = request_irq(l3->debug_irq, | 158 | ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler, |
159 | l3_interrupt_handler, | 159 | IRQF_DISABLED, "l3-dbg-irq", l3); |
160 | IRQF_DISABLED, "l3-dbg-irq", l3); | ||
161 | if (ret) { | 160 | if (ret) { |
162 | pr_crit("L3: request_irq failed to register for 0x%x\n", | 161 | pr_crit("L3: request_irq failed to register for 0x%x\n", |
163 | l3->debug_irq); | 162 | l3->debug_irq); |
@@ -165,29 +164,17 @@ static int omap4_l3_probe(struct platform_device *pdev) | |||
165 | } | 164 | } |
166 | 165 | ||
167 | l3->app_irq = platform_get_irq(pdev, 1); | 166 | l3->app_irq = platform_get_irq(pdev, 1); |
168 | ret = request_irq(l3->app_irq, | 167 | ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler, |
169 | l3_interrupt_handler, | 168 | IRQF_DISABLED, "l3-app-irq", l3); |
170 | IRQF_DISABLED, "l3-app-irq", l3); | 169 | if (ret) |
171 | if (ret) { | ||
172 | pr_crit("L3: request_irq failed to register for 0x%x\n", | 170 | pr_crit("L3: request_irq failed to register for 0x%x\n", |
173 | l3->app_irq); | 171 | l3->app_irq); |
174 | goto err4; | ||
175 | } | ||
176 | |||
177 | return 0; | ||
178 | 172 | ||
179 | err4: | ||
180 | free_irq(l3->debug_irq, l3); | ||
181 | return ret; | 173 | return ret; |
182 | } | 174 | } |
183 | 175 | ||
184 | static int omap4_l3_remove(struct platform_device *pdev) | 176 | static int omap4_l3_remove(struct platform_device *pdev) |
185 | { | 177 | { |
186 | struct omap4_l3 *l3 = platform_get_drvdata(pdev); | ||
187 | |||
188 | free_irq(l3->app_irq, l3); | ||
189 | free_irq(l3->debug_irq, l3); | ||
190 | |||
191 | return 0; | 178 | return 0; |
192 | } | 179 | } |
193 | 180 | ||