diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-18 13:09:58 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-06-28 15:41:33 -0400 |
commit | 1636f8ac2b08410df4766449f7c86b912443cd99 (patch) | |
tree | 9c923c017e956779f237d4ffa51d49beb3de6d3e /sound/sparc | |
parent | 2b07be2493681220cac4d185494a4edb0b8efd1e (diff) |
sparc/of: Move of_device fields into struct pdev_archdata
This patch moves SPARC architecture specific data members out of
struct of_device and into the pdev_archdata structure. The reason
for this change is to unify the struct of_device definition amongst
all the architectures. It also remvoes the .sysdata, .slot, .portid
and .clock_freq properties because they aren't actually used by
anything.
A subsequent patch will replace struct of_device entirely with struct
platform_device and the of_platform support code will share common
routines with the platform bus (but the bus instances themselves can
remain separate).
This patch also adds 'struct resources *resource' and num_resources
to match the fields defined in struct platform_device. After this
change, 'struct platform_device' can be used as a drop-in replacement
for 'struct of_platform'.
This change is in preparation for merging the of_platform_bus_type
with the platform_bus_type.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'sound/sparc')
-rw-r--r-- | sound/sparc/amd7930.c | 2 | ||||
-rw-r--r-- | sound/sparc/cs4231.c | 14 | ||||
-rw-r--r-- | sound/sparc/dbri.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index 71221fd20944..43c63d441087 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c | |||
@@ -1010,7 +1010,7 @@ static int __devinit amd7930_sbus_probe(struct of_device *op, const struct of_de | |||
1010 | struct snd_amd7930 *amd; | 1010 | struct snd_amd7930 *amd; |
1011 | int err, irq; | 1011 | int err, irq; |
1012 | 1012 | ||
1013 | irq = op->irqs[0]; | 1013 | irq = op->archdata.irqs[0]; |
1014 | 1014 | ||
1015 | if (dev_num >= SNDRV_CARDS) | 1015 | if (dev_num >= SNDRV_CARDS) |
1016 | return -ENODEV; | 1016 | return -ENODEV; |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index fb4c6f2f29e5..f7f05c246303 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -1832,14 +1832,14 @@ static int __devinit snd_cs4231_sbus_create(struct snd_card *card, | |||
1832 | chip->c_dma.request = sbus_dma_request; | 1832 | chip->c_dma.request = sbus_dma_request; |
1833 | chip->c_dma.address = sbus_dma_addr; | 1833 | chip->c_dma.address = sbus_dma_addr; |
1834 | 1834 | ||
1835 | if (request_irq(op->irqs[0], snd_cs4231_sbus_interrupt, | 1835 | if (request_irq(op->archdata.irqs[0], snd_cs4231_sbus_interrupt, |
1836 | IRQF_SHARED, "cs4231", chip)) { | 1836 | IRQF_SHARED, "cs4231", chip)) { |
1837 | snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n", | 1837 | snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n", |
1838 | dev, op->irqs[0]); | 1838 | dev, op->archdata.irqs[0]); |
1839 | snd_cs4231_sbus_free(chip); | 1839 | snd_cs4231_sbus_free(chip); |
1840 | return -EBUSY; | 1840 | return -EBUSY; |
1841 | } | 1841 | } |
1842 | chip->irq[0] = op->irqs[0]; | 1842 | chip->irq[0] = op->archdata.irqs[0]; |
1843 | 1843 | ||
1844 | if (snd_cs4231_probe(chip) < 0) { | 1844 | if (snd_cs4231_probe(chip) < 0) { |
1845 | snd_cs4231_sbus_free(chip); | 1845 | snd_cs4231_sbus_free(chip); |
@@ -1870,7 +1870,7 @@ static int __devinit cs4231_sbus_probe(struct of_device *op, const struct of_dev | |||
1870 | card->shortname, | 1870 | card->shortname, |
1871 | rp->flags & 0xffL, | 1871 | rp->flags & 0xffL, |
1872 | (unsigned long long)rp->start, | 1872 | (unsigned long long)rp->start, |
1873 | op->irqs[0]); | 1873 | op->archdata.irqs[0]); |
1874 | 1874 | ||
1875 | err = snd_cs4231_sbus_create(card, op, dev); | 1875 | err = snd_cs4231_sbus_create(card, op, dev); |
1876 | if (err < 0) { | 1876 | if (err < 0) { |
@@ -1979,12 +1979,12 @@ static int __devinit snd_cs4231_ebus_create(struct snd_card *card, | |||
1979 | chip->c_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; | 1979 | chip->c_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; |
1980 | chip->c_dma.ebus_info.callback = snd_cs4231_ebus_capture_callback; | 1980 | chip->c_dma.ebus_info.callback = snd_cs4231_ebus_capture_callback; |
1981 | chip->c_dma.ebus_info.client_cookie = chip; | 1981 | chip->c_dma.ebus_info.client_cookie = chip; |
1982 | chip->c_dma.ebus_info.irq = op->irqs[0]; | 1982 | chip->c_dma.ebus_info.irq = op->archdata.irqs[0]; |
1983 | strcpy(chip->p_dma.ebus_info.name, "cs4231(play)"); | 1983 | strcpy(chip->p_dma.ebus_info.name, "cs4231(play)"); |
1984 | chip->p_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; | 1984 | chip->p_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; |
1985 | chip->p_dma.ebus_info.callback = snd_cs4231_ebus_play_callback; | 1985 | chip->p_dma.ebus_info.callback = snd_cs4231_ebus_play_callback; |
1986 | chip->p_dma.ebus_info.client_cookie = chip; | 1986 | chip->p_dma.ebus_info.client_cookie = chip; |
1987 | chip->p_dma.ebus_info.irq = op->irqs[1]; | 1987 | chip->p_dma.ebus_info.irq = op->archdata.irqs[1]; |
1988 | 1988 | ||
1989 | chip->p_dma.prepare = _ebus_dma_prepare; | 1989 | chip->p_dma.prepare = _ebus_dma_prepare; |
1990 | chip->p_dma.enable = _ebus_dma_enable; | 1990 | chip->p_dma.enable = _ebus_dma_enable; |
@@ -2060,7 +2060,7 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev | |||
2060 | sprintf(card->longname, "%s at 0x%llx, irq %d", | 2060 | sprintf(card->longname, "%s at 0x%llx, irq %d", |
2061 | card->shortname, | 2061 | card->shortname, |
2062 | op->resource[0].start, | 2062 | op->resource[0].start, |
2063 | op->irqs[0]); | 2063 | op->archdata.irqs[0]); |
2064 | 2064 | ||
2065 | err = snd_cs4231_ebus_create(card, op, dev); | 2065 | err = snd_cs4231_ebus_create(card, op, dev); |
2066 | if (err < 0) { | 2066 | if (err < 0) { |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 1557bf132e73..491ce71c84b6 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -2608,7 +2608,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_id | |||
2608 | return -ENOENT; | 2608 | return -ENOENT; |
2609 | } | 2609 | } |
2610 | 2610 | ||
2611 | irq = op->irqs[0]; | 2611 | irq = op->archdata.irqs[0]; |
2612 | if (irq <= 0) { | 2612 | if (irq <= 0) { |
2613 | printk(KERN_ERR "DBRI-%d: No IRQ.\n", dev); | 2613 | printk(KERN_ERR "DBRI-%d: No IRQ.\n", dev); |
2614 | return -ENODEV; | 2614 | return -ENODEV; |