Skip to content

Commit 2548e6c

Browse files
committed
ARM: pxa: pxa2xx-ac97-lib: use IRQ resource
The pxa2xx-ac97-lib code is the last driver to use mach/irqs.h for PXA. Almost everything already passes the interrupt as a resource, so use it from there. The one exception is the mxm8x10 machine, which apparently has a resource-less device. Replacing it with the correct one enables the driver here as well. Cc: [email protected] Acked-by: Robert Jarzmik <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent e86bd43 commit 2548e6c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

arch/arm/mach-pxa/mxm8x10.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/platform_data/video-pxafb.h>
2727
#include <linux/platform_data/mmc-pxamci.h>
2828
#include <linux/platform_data/usb-ohci-pxa27x.h>
29+
#include <linux/platform_data/asoc-pxa.h>
2930
#include "pxa320.h"
3031

3132
#include "mxm8x10.h"
@@ -356,14 +357,9 @@ void __init mxm_8x10_usb_host_init(void)
356357
pxa_set_ohci_info(&mxm_8x10_ohci_platform_data);
357358
}
358359

359-
/* AC97 Sound Support */
360-
static struct platform_device mxm_8x10_ac97_device = {
361-
.name = "pxa2xx-ac97"
362-
};
363-
364360
void __init mxm_8x10_ac97_init(void)
365361
{
366-
platform_device_register(&mxm_8x10_ac97_device);
362+
pxa_set_ac97_info(NULL);
367363
}
368364

369365
/* NAND flash Support */

sound/arm/pxa2xx-ac97-lib.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#include <sound/pxa2xx-lib.h>
2323

24-
#include <mach/irqs.h>
2524
#include <mach/regs-ac97.h>
2625
#include <linux/platform_data/asoc-pxa.h>
2726

@@ -319,6 +318,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_resume);
319318
int pxa2xx_ac97_hw_probe(struct platform_device *dev)
320319
{
321320
int ret;
321+
int irq;
322322
pxa2xx_audio_ops_t *pdata = dev->dev.platform_data;
323323

324324
if (pdata) {
@@ -387,7 +387,11 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
387387
if (ret)
388388
goto err_clk2;
389389

390-
ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, 0, "AC97", NULL);
390+
irq = platform_get_irq(dev, 0);
391+
if (!irq)
392+
goto err_irq;
393+
394+
ret = request_irq(irq, pxa2xx_ac97_irq, 0, "AC97", NULL);
391395
if (ret < 0)
392396
goto err_irq;
393397

@@ -413,7 +417,7 @@ void pxa2xx_ac97_hw_remove(struct platform_device *dev)
413417
if (cpu_is_pxa27x())
414418
gpio_free(reset_gpio);
415419
GCR |= GCR_ACLINK_OFF;
416-
free_irq(IRQ_AC97, NULL);
420+
free_irq(platform_get_irq(dev, 0), NULL);
417421
if (ac97conf_clk) {
418422
clk_put(ac97conf_clk);
419423
ac97conf_clk = NULL;

0 commit comments

Comments
 (0)