aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/aoa/soundbus/core.c2
-rw-r--r--sound/aoa/soundbus/soundbus.h2
-rw-r--r--sound/aoa/soundbus/sysfs.c2
-rw-r--r--sound/core/pcm_native.c13
-rw-r--r--sound/drivers/Kconfig2
-rw-r--r--sound/pci/trident/trident_main.c2
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c9
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.h1
-rw-r--r--sound/pcmcia/vx/vxpocket.c9
-rw-r--r--sound/pcmcia/vx/vxpocket.h1
-rw-r--r--sound/soc/fsl/mpc5200_dma.c4
-rw-r--r--sound/soc/fsl/mpc5200_dma.h4
-rw-r--r--sound/soc/fsl/mpc5200_psc_ac97.c26
-rw-r--r--sound/soc/fsl/mpc5200_psc_i2s.c4
-rw-r--r--sound/soc/fsl/mpc8610_hpcd.c6
-rw-r--r--sound/soc/imx/imx-ssi.c2
-rw-r--r--sound/soc/soc-core.c2
-rw-r--r--sound/sparc/amd7930.c14
-rw-r--r--sound/sparc/cs4231.c36
-rw-r--r--sound/sparc/dbri.c14
-rw-r--r--sound/usb/pcm.c2
21 files changed, 84 insertions, 73 deletions
diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c
index 99ca7120e26..7487eb76e03 100644
--- a/sound/aoa/soundbus/core.c
+++ b/sound/aoa/soundbus/core.c
@@ -59,7 +59,7 @@ static int soundbus_probe(struct device *dev)
59static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) 59static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)
60{ 60{
61 struct soundbus_dev * soundbus_dev; 61 struct soundbus_dev * soundbus_dev;
62 struct of_device * of; 62 struct platform_device * of;
63 const char *compat; 63 const char *compat;
64 int retval = 0; 64 int retval = 0;
65 int cplen, seen = 0; 65 int cplen, seen = 0;
diff --git a/sound/aoa/soundbus/soundbus.h b/sound/aoa/soundbus/soundbus.h
index a0f223c13f6..adecbf36f4f 100644
--- a/sound/aoa/soundbus/soundbus.h
+++ b/sound/aoa/soundbus/soundbus.h
@@ -141,7 +141,7 @@ struct soundbus_dev {
141 struct list_head onbuslist; 141 struct list_head onbuslist;
142 142
143 /* the of device it represents */ 143 /* the of device it represents */
144 struct of_device ofdev; 144 struct platform_device ofdev;
145 145
146 /* what modules go by */ 146 /* what modules go by */
147 char modalias[32]; 147 char modalias[32];
diff --git a/sound/aoa/soundbus/sysfs.c b/sound/aoa/soundbus/sysfs.c
index 6496e754f00..e0980b5c2cd 100644
--- a/sound/aoa/soundbus/sysfs.c
+++ b/sound/aoa/soundbus/sysfs.c
@@ -16,7 +16,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
16 char *buf) 16 char *buf)
17{ 17{
18 struct soundbus_dev *sdev = to_soundbus_device(dev); 18 struct soundbus_dev *sdev = to_soundbus_device(dev);
19 struct of_device *of = &sdev->ofdev; 19 struct platform_device *of = &sdev->ofdev;
20 int length; 20 int length;
21 21
22 if (*sdev->modalias) { 22 if (*sdev->modalias) {
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 303ac04ff6e..a3b2a647924 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -451,13 +451,11 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
451 snd_pcm_timer_resolution_change(substream); 451 snd_pcm_timer_resolution_change(substream);
452 runtime->status->state = SNDRV_PCM_STATE_SETUP; 452 runtime->status->state = SNDRV_PCM_STATE_SETUP;
453 453
454 if (substream->latency_pm_qos_req) { 454 if (pm_qos_request_active(&substream->latency_pm_qos_req))
455 pm_qos_remove_request(substream->latency_pm_qos_req); 455 pm_qos_remove_request(&substream->latency_pm_qos_req);
456 substream->latency_pm_qos_req = NULL;
457 }
458 if ((usecs = period_to_usecs(runtime)) >= 0) 456 if ((usecs = period_to_usecs(runtime)) >= 0)
459 substream->latency_pm_qos_req = pm_qos_add_request( 457 pm_qos_add_request(&substream->latency_pm_qos_req,
460 PM_QOS_CPU_DMA_LATENCY, usecs); 458 PM_QOS_CPU_DMA_LATENCY, usecs);
461 return 0; 459 return 0;
462 _error: 460 _error:
463 /* hardware might be unuseable from this time, 461 /* hardware might be unuseable from this time,
@@ -512,8 +510,7 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
512 if (substream->ops->hw_free) 510 if (substream->ops->hw_free)
513 result = substream->ops->hw_free(substream); 511 result = substream->ops->hw_free(substream);
514 runtime->status->state = SNDRV_PCM_STATE_OPEN; 512 runtime->status->state = SNDRV_PCM_STATE_OPEN;
515 pm_qos_remove_request(substream->latency_pm_qos_req); 513 pm_qos_remove_request(&substream->latency_pm_qos_req);
516 substream->latency_pm_qos_req = NULL;
517 return result; 514 return result;
518} 515}
519 516
diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig
index 32646000ab9..480c38623da 100644
--- a/sound/drivers/Kconfig
+++ b/sound/drivers/Kconfig
@@ -155,7 +155,7 @@ config SND_ML403_AC97CR
155 select SND_AC97_CODEC 155 select SND_AC97_CODEC
156 help 156 help
157 Say Y here to include support for the 157 Say Y here to include support for the
158 opb_ac97_controller_ref_v1_00_a ip core found in Xilinx' ML403 158 opb_ac97_controller_ref_v1_00_a ip core found in Xilinx's ML403
159 reference design. 159 reference design.
160 160
161 To compile this driver as a module, choose M here: the module 161 To compile this driver as a module, choose M here: the module
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index 6d943f6f6b7..2870a4fdc13 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -1055,7 +1055,7 @@ static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
1055 1055
1056 spin_lock_irq(&trident->reg_lock); 1056 spin_lock_irq(&trident->reg_lock);
1057 1057
1058 // Initilize the channel and set channel Mode 1058 // Initialize the channel and set channel Mode
1059 outb(0, TRID_REG(trident, LEGACY_DMAR15)); 1059 outb(0, TRID_REG(trident, LEGACY_DMAR15));
1060 1060
1061 // Set DMA channel operation mode register 1061 // Set DMA channel operation mode register
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index df110df52a8..7ab9174a8a8 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -139,8 +139,8 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
139 pdacf->p_dev = link; 139 pdacf->p_dev = link;
140 link->priv = pdacf; 140 link->priv = pdacf;
141 141
142 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 142 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
143 link->io.NumPorts1 = 16; 143 link->resource[0]->end = 16;
144 144
145 link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 145 link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
146 link->conf.IntType = INT_MEMORY_AND_IO; 146 link->conf.IntType = INT_MEMORY_AND_IO;
@@ -219,7 +219,7 @@ static int pdacf_config(struct pcmcia_device *link)
219 snd_printdd(KERN_DEBUG "pdacf_config called\n"); 219 snd_printdd(KERN_DEBUG "pdacf_config called\n");
220 link->conf.ConfigIndex = 0x5; 220 link->conf.ConfigIndex = 0x5;
221 221
222 ret = pcmcia_request_io(link, &link->io); 222 ret = pcmcia_request_io(link);
223 if (ret) 223 if (ret)
224 goto failed; 224 goto failed;
225 225
@@ -231,7 +231,8 @@ static int pdacf_config(struct pcmcia_device *link)
231 if (ret) 231 if (ret)
232 goto failed; 232 goto failed;
233 233
234 if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq) < 0) 234 if (snd_pdacf_assign_resources(pdacf, link->resource[0]->start,
235 link->irq) < 0)
235 goto failed; 236 goto failed;
236 237
237 return 0; 238 return 0;
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.h b/sound/pcmcia/pdaudiocf/pdaudiocf.h
index a0a7ec64222..5cc3e457307 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.h
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.h
@@ -24,7 +24,6 @@
24#include <sound/pcm.h> 24#include <sound/pcm.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <pcmcia/cs_types.h>
28#include <pcmcia/cs.h> 27#include <pcmcia/cs.h>
29#include <pcmcia/cistpl.h> 28#include <pcmcia/cistpl.h>
30#include <pcmcia/ds.h> 29#include <pcmcia/ds.h>
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 624b47a85f0..a6edfc3be29 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -159,8 +159,8 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl,
159 vxp->p_dev = link; 159 vxp->p_dev = link;
160 link->priv = chip; 160 link->priv = chip;
161 161
162 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 162 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
163 link->io.NumPorts1 = 16; 163 link->resource[0]->end = 16;
164 164
165 link->conf.Attributes = CONF_ENABLE_IRQ; 165 link->conf.Attributes = CONF_ENABLE_IRQ;
166 link->conf.IntType = INT_MEMORY_AND_IO; 166 link->conf.IntType = INT_MEMORY_AND_IO;
@@ -226,7 +226,7 @@ static int vxpocket_config(struct pcmcia_device *link)
226 strcpy(chip->card->driver, vxp440_hw.name); 226 strcpy(chip->card->driver, vxp440_hw.name);
227 } 227 }
228 228
229 ret = pcmcia_request_io(link, &link->io); 229 ret = pcmcia_request_io(link);
230 if (ret) 230 if (ret)
231 goto failed; 231 goto failed;
232 232
@@ -241,7 +241,8 @@ static int vxpocket_config(struct pcmcia_device *link)
241 chip->dev = &link->dev; 241 chip->dev = &link->dev;
242 snd_card_set_dev(chip->card, chip->dev); 242 snd_card_set_dev(chip->card, chip->dev);
243 243
244 if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq) < 0) 244 if (snd_vxpocket_assign_resources(chip, link->resource[0]->start,
245 link->irq) < 0)
245 goto failed; 246 goto failed;
246 247
247 return 0; 248 return 0;
diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h
index ea4df16a28e..d9110669d04 100644
--- a/sound/pcmcia/vx/vxpocket.h
+++ b/sound/pcmcia/vx/vxpocket.h
@@ -23,7 +23,6 @@
23 23
24#include <sound/vx_core.h> 24#include <sound/vx_core.h>
25 25
26#include <pcmcia/cs_types.h>
27#include <pcmcia/cs.h> 26#include <pcmcia/cs.h>
28#include <pcmcia/cistpl.h> 27#include <pcmcia/cistpl.h>
29#include <pcmcia/ds.h> 28#include <pcmcia/ds.h>
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index 1d4e7164e80..3dcd1469f28 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -369,7 +369,7 @@ struct snd_soc_platform mpc5200_audio_dma_platform = {
369}; 369};
370EXPORT_SYMBOL_GPL(mpc5200_audio_dma_platform); 370EXPORT_SYMBOL_GPL(mpc5200_audio_dma_platform);
371 371
372int mpc5200_audio_dma_create(struct of_device *op) 372int mpc5200_audio_dma_create(struct platform_device *op)
373{ 373{
374 phys_addr_t fifo; 374 phys_addr_t fifo;
375 struct psc_dma *psc_dma; 375 struct psc_dma *psc_dma;
@@ -488,7 +488,7 @@ out_unmap:
488} 488}
489EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create); 489EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create);
490 490
491int mpc5200_audio_dma_destroy(struct of_device *op) 491int mpc5200_audio_dma_destroy(struct platform_device *op)
492{ 492{
493 struct psc_dma *psc_dma = dev_get_drvdata(&op->dev); 493 struct psc_dma *psc_dma = dev_get_drvdata(&op->dev);
494 494
diff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h
index e1ec6d91ea3..ca99586f2ad 100644
--- a/sound/soc/fsl/mpc5200_dma.h
+++ b/sound/soc/fsl/mpc5200_dma.h
@@ -81,8 +81,8 @@ to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma)
81 return &psc_dma->playback; 81 return &psc_dma->playback;
82} 82}
83 83
84int mpc5200_audio_dma_create(struct of_device *op); 84int mpc5200_audio_dma_create(struct platform_device *op);
85int mpc5200_audio_dma_destroy(struct of_device *op); 85int mpc5200_audio_dma_destroy(struct platform_device *op);
86 86
87extern struct snd_soc_platform mpc5200_audio_dma_platform; 87extern struct snd_soc_platform mpc5200_audio_dma_platform;
88 88
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index e2ee220bfb7..a9560235dae 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -20,6 +20,7 @@
20 20
21#include <asm/time.h> 21#include <asm/time.h>
22#include <asm/delay.h> 22#include <asm/delay.h>
23#include <asm/mpc52xx.h>
23#include <asm/mpc52xx_psc.h> 24#include <asm/mpc52xx_psc.h>
24 25
25#include "mpc5200_dma.h" 26#include "mpc5200_dma.h"
@@ -100,19 +101,32 @@ static void psc_ac97_warm_reset(struct snd_ac97 *ac97)
100{ 101{
101 struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; 102 struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;
102 103
104 mutex_lock(&psc_dma->mutex);
105
103 out_be32(&regs->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_AWR); 106 out_be32(&regs->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_AWR);
104 udelay(3); 107 udelay(3);
105 out_be32(&regs->sicr, psc_dma->sicr); 108 out_be32(&regs->sicr, psc_dma->sicr);
109
110 mutex_unlock(&psc_dma->mutex);
106} 111}
107 112
108static void psc_ac97_cold_reset(struct snd_ac97 *ac97) 113static void psc_ac97_cold_reset(struct snd_ac97 *ac97)
109{ 114{
110 struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; 115 struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;
111 116
112 /* Do a cold reset */ 117 mutex_lock(&psc_dma->mutex);
113 out_8(&regs->op1, MPC52xx_PSC_OP_RES); 118 dev_dbg(psc_dma->dev, "cold reset\n");
114 udelay(10); 119
115 out_8(&regs->op0, MPC52xx_PSC_OP_RES); 120 mpc5200_psc_ac97_gpio_reset(psc_dma->id);
121
122 /* Notify the PSC that a reset has occurred */
123 out_be32(&regs->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_ACRB);
124
125 /* Re-enable RX and TX */
126 out_8(&regs->command, MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE);
127
128 mutex_unlock(&psc_dma->mutex);
129
116 msleep(1); 130 msleep(1);
117 psc_ac97_warm_reset(ac97); 131 psc_ac97_warm_reset(ac97);
118} 132}
@@ -263,7 +277,7 @@ EXPORT_SYMBOL_GPL(psc_ac97_dai);
263 * - Probe/remove operations 277 * - Probe/remove operations
264 * - OF device match table 278 * - OF device match table
265 */ 279 */
266static int __devinit psc_ac97_of_probe(struct of_device *op, 280static int __devinit psc_ac97_of_probe(struct platform_device *op,
267 const struct of_device_id *match) 281 const struct of_device_id *match)
268{ 282{
269 int rc, i; 283 int rc, i;
@@ -303,7 +317,7 @@ static int __devinit psc_ac97_of_probe(struct of_device *op,
303 return 0; 317 return 0;
304} 318}
305 319
306static int __devexit psc_ac97_of_remove(struct of_device *op) 320static int __devexit psc_ac97_of_remove(struct platform_device *op)
307{ 321{
308 return mpc5200_audio_dma_destroy(op); 322 return mpc5200_audio_dma_destroy(op);
309} 323}
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index 676841cbae9..534f04cb15d 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -152,7 +152,7 @@ EXPORT_SYMBOL_GPL(psc_i2s_dai);
152 * - Probe/remove operations 152 * - Probe/remove operations
153 * - OF device match table 153 * - OF device match table
154 */ 154 */
155static int __devinit psc_i2s_of_probe(struct of_device *op, 155static int __devinit psc_i2s_of_probe(struct platform_device *op,
156 const struct of_device_id *match) 156 const struct of_device_id *match)
157{ 157{
158 int rc; 158 int rc;
@@ -205,7 +205,7 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
205 205
206} 206}
207 207
208static int __devexit psc_i2s_of_remove(struct of_device *op) 208static int __devexit psc_i2s_of_remove(struct platform_device *op)
209{ 209{
210 return mpc5200_audio_dma_destroy(op); 210 return mpc5200_audio_dma_destroy(op);
211} 211}
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index 6a2764ee820..3b13b8d6526 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -46,7 +46,7 @@ struct mpc8610_hpcd_data {
46}; 46};
47 47
48/** 48/**
49 * mpc8610_hpcd_machine_probe: initalize the board 49 * mpc8610_hpcd_machine_probe: initialize the board
50 * 50 *
51 * This function is called when platform_device_add() is called. It is used 51 * This function is called when platform_device_add() is called. It is used
52 * to initialize the board-specific hardware. 52 * to initialize the board-specific hardware.
@@ -200,7 +200,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
200 * SSI devices. We also probably aren't compatible with the generic Elo DMA 200 * SSI devices. We also probably aren't compatible with the generic Elo DMA
201 * device driver. 201 * device driver.
202 */ 202 */
203static int mpc8610_hpcd_probe(struct of_device *ofdev, 203static int mpc8610_hpcd_probe(struct platform_device *ofdev,
204 const struct of_device_id *match) 204 const struct of_device_id *match)
205{ 205{
206 struct device_node *np = ofdev->dev.of_node; 206 struct device_node *np = ofdev->dev.of_node;
@@ -534,7 +534,7 @@ error:
534 * 534 *
535 * This function is called when the OF device is removed. 535 * This function is called when the OF device is removed.
536 */ 536 */
537static int mpc8610_hpcd_remove(struct of_device *ofdev) 537static int mpc8610_hpcd_remove(struct platform_device *ofdev)
538{ 538{
539 struct platform_device *sound_device = dev_get_drvdata(&ofdev->dev); 539 struct platform_device *sound_device = dev_get_drvdata(&ofdev->dev);
540 struct mpc8610_hpcd_data *machine_data = 540 struct mpc8610_hpcd_data *machine_data =
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
index 50f51624c53..a11daa1e905 100644
--- a/sound/soc/imx/imx-ssi.c
+++ b/sound/soc/imx/imx-ssi.c
@@ -23,7 +23,7 @@
23 * between pcm data and GPIO status data changes. Our FIQ handler is not 23 * between pcm data and GPIO status data changes. Our FIQ handler is not
24 * able to handle this, hence this driver only works with 48000Hz sampling 24 * able to handle this, hence this driver only works with 48000Hz sampling
25 * rate. 25 * rate.
26 * Reading and writing AC97 registers is another challange. The core 26 * Reading and writing AC97 registers is another challenge. The core
27 * provides us status bits when the read register is updated with *another* 27 * provides us status bits when the read register is updated with *another*
28 * value. When we read the same register two times (and the register still 28 * value. When we read the same register two times (and the register still
29 * contains the same value) these status bits are not set. We work 29 * contains the same value) these status bits are not set. We work
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 5299932db0b..844ae8221a3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1319,7 +1319,7 @@ cpu_dai_err:
1319} 1319}
1320 1320
1321/* 1321/*
1322 * Attempt to initialise any uninitalised cards. Must be called with 1322 * Attempt to initialise any uninitialised cards. Must be called with
1323 * client_mutex. 1323 * client_mutex.
1324 */ 1324 */
1325static void snd_soc_instantiate_cards(void) 1325static void snd_soc_instantiate_cards(void)
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 71221fd2094..f8bcfc30f80 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -336,7 +336,7 @@ struct snd_amd7930 {
336 int pgain; 336 int pgain;
337 int mgain; 337 int mgain;
338 338
339 struct of_device *op; 339 struct platform_device *op;
340 unsigned int irq; 340 unsigned int irq;
341 struct snd_amd7930 *next; 341 struct snd_amd7930 *next;
342}; 342};
@@ -906,7 +906,7 @@ static int __devinit snd_amd7930_mixer(struct snd_amd7930 *amd)
906 906
907static int snd_amd7930_free(struct snd_amd7930 *amd) 907static int snd_amd7930_free(struct snd_amd7930 *amd)
908{ 908{
909 struct of_device *op = amd->op; 909 struct platform_device *op = amd->op;
910 910
911 amd7930_idle(amd); 911 amd7930_idle(amd);
912 912
@@ -934,7 +934,7 @@ static struct snd_device_ops snd_amd7930_dev_ops = {
934}; 934};
935 935
936static int __devinit snd_amd7930_create(struct snd_card *card, 936static int __devinit snd_amd7930_create(struct snd_card *card,
937 struct of_device *op, 937 struct platform_device *op,
938 int irq, int dev, 938 int irq, int dev,
939 struct snd_amd7930 **ramd) 939 struct snd_amd7930 **ramd)
940{ 940{
@@ -1002,7 +1002,7 @@ static int __devinit snd_amd7930_create(struct snd_card *card,
1002 return 0; 1002 return 0;
1003} 1003}
1004 1004
1005static int __devinit amd7930_sbus_probe(struct of_device *op, const struct of_device_id *match) 1005static int __devinit amd7930_sbus_probe(struct platform_device *op, const struct of_device_id *match)
1006{ 1006{
1007 struct resource *rp = &op->resource[0]; 1007 struct resource *rp = &op->resource[0];
1008 static int dev_num; 1008 static int dev_num;
@@ -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;
@@ -1075,7 +1075,7 @@ static struct of_platform_driver amd7930_sbus_driver = {
1075 1075
1076static int __init amd7930_init(void) 1076static int __init amd7930_init(void)
1077{ 1077{
1078 return of_register_driver(&amd7930_sbus_driver, &of_bus_type); 1078 return of_register_platform_driver(&amd7930_sbus_driver);
1079} 1079}
1080 1080
1081static void __exit amd7930_exit(void) 1081static void __exit amd7930_exit(void)
@@ -1092,7 +1092,7 @@ static void __exit amd7930_exit(void)
1092 1092
1093 amd7930_list = NULL; 1093 amd7930_list = NULL;
1094 1094
1095 of_unregister_driver(&amd7930_sbus_driver); 1095 of_unregister_platform_driver(&amd7930_sbus_driver);
1096} 1096}
1097 1097
1098module_init(amd7930_init); 1098module_init(amd7930_init);
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index fb4c6f2f29e..c276086c3b5 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -111,7 +111,7 @@ struct snd_cs4231 {
111 struct mutex mce_mutex; /* mutex for mce register */ 111 struct mutex mce_mutex; /* mutex for mce register */
112 struct mutex open_mutex; /* mutex for ALSA open/close */ 112 struct mutex open_mutex; /* mutex for ALSA open/close */
113 113
114 struct of_device *op; 114 struct platform_device *op;
115 unsigned int irq[2]; 115 unsigned int irq[2];
116 unsigned int regs_size; 116 unsigned int regs_size;
117 struct snd_cs4231 *next; 117 struct snd_cs4231 *next;
@@ -1771,7 +1771,7 @@ static unsigned int sbus_dma_addr(struct cs4231_dma_control *dma_cont)
1771 1771
1772static int snd_cs4231_sbus_free(struct snd_cs4231 *chip) 1772static int snd_cs4231_sbus_free(struct snd_cs4231 *chip)
1773{ 1773{
1774 struct of_device *op = chip->op; 1774 struct platform_device *op = chip->op;
1775 1775
1776 if (chip->irq[0]) 1776 if (chip->irq[0])
1777 free_irq(chip->irq[0], chip); 1777 free_irq(chip->irq[0], chip);
@@ -1794,7 +1794,7 @@ static struct snd_device_ops snd_cs4231_sbus_dev_ops = {
1794}; 1794};
1795 1795
1796static int __devinit snd_cs4231_sbus_create(struct snd_card *card, 1796static int __devinit snd_cs4231_sbus_create(struct snd_card *card,
1797 struct of_device *op, 1797 struct platform_device *op,
1798 int dev) 1798 int dev)
1799{ 1799{
1800 struct snd_cs4231 *chip = card->private_data; 1800 struct snd_cs4231 *chip = card->private_data;
@@ -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);
@@ -1856,7 +1856,7 @@ static int __devinit snd_cs4231_sbus_create(struct snd_card *card,
1856 return 0; 1856 return 0;
1857} 1857}
1858 1858
1859static int __devinit cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match) 1859static int __devinit cs4231_sbus_probe(struct platform_device *op, const struct of_device_id *match)
1860{ 1860{
1861 struct resource *rp = &op->resource[0]; 1861 struct resource *rp = &op->resource[0];
1862 struct snd_card *card; 1862 struct snd_card *card;
@@ -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) {
@@ -1931,7 +1931,7 @@ static unsigned int _ebus_dma_addr(struct cs4231_dma_control *dma_cont)
1931 1931
1932static int snd_cs4231_ebus_free(struct snd_cs4231 *chip) 1932static int snd_cs4231_ebus_free(struct snd_cs4231 *chip)
1933{ 1933{
1934 struct of_device *op = chip->op; 1934 struct platform_device *op = chip->op;
1935 1935
1936 if (chip->c_dma.ebus_info.regs) { 1936 if (chip->c_dma.ebus_info.regs) {
1937 ebus_dma_unregister(&chip->c_dma.ebus_info); 1937 ebus_dma_unregister(&chip->c_dma.ebus_info);
@@ -1960,7 +1960,7 @@ static struct snd_device_ops snd_cs4231_ebus_dev_ops = {
1960}; 1960};
1961 1961
1962static int __devinit snd_cs4231_ebus_create(struct snd_card *card, 1962static int __devinit snd_cs4231_ebus_create(struct snd_card *card,
1963 struct of_device *op, 1963 struct platform_device *op,
1964 int dev) 1964 int dev)
1965{ 1965{
1966 struct snd_cs4231 *chip = card->private_data; 1966 struct snd_cs4231 *chip = card->private_data;
@@ -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;
@@ -2048,7 +2048,7 @@ static int __devinit snd_cs4231_ebus_create(struct snd_card *card,
2048 return 0; 2048 return 0;
2049} 2049}
2050 2050
2051static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match) 2051static int __devinit cs4231_ebus_probe(struct platform_device *op, const struct of_device_id *match)
2052{ 2052{
2053 struct snd_card *card; 2053 struct snd_card *card;
2054 int err; 2054 int err;
@@ -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) {
@@ -2072,7 +2072,7 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev
2072} 2072}
2073#endif 2073#endif
2074 2074
2075static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) 2075static int __devinit cs4231_probe(struct platform_device *op, const struct of_device_id *match)
2076{ 2076{
2077#ifdef EBUS_SUPPORT 2077#ifdef EBUS_SUPPORT
2078 if (!strcmp(op->dev.of_node->parent->name, "ebus")) 2078 if (!strcmp(op->dev.of_node->parent->name, "ebus"))
@@ -2086,7 +2086,7 @@ static int __devinit cs4231_probe(struct of_device *op, const struct of_device_i
2086 return -ENODEV; 2086 return -ENODEV;
2087} 2087}
2088 2088
2089static int __devexit cs4231_remove(struct of_device *op) 2089static int __devexit cs4231_remove(struct platform_device *op)
2090{ 2090{
2091 struct snd_cs4231 *chip = dev_get_drvdata(&op->dev); 2091 struct snd_cs4231 *chip = dev_get_drvdata(&op->dev);
2092 2092
@@ -2120,12 +2120,12 @@ static struct of_platform_driver cs4231_driver = {
2120 2120
2121static int __init cs4231_init(void) 2121static int __init cs4231_init(void)
2122{ 2122{
2123 return of_register_driver(&cs4231_driver, &of_bus_type); 2123 return of_register_platform_driver(&cs4231_driver);
2124} 2124}
2125 2125
2126static void __exit cs4231_exit(void) 2126static void __exit cs4231_exit(void)
2127{ 2127{
2128 of_unregister_driver(&cs4231_driver); 2128 of_unregister_platform_driver(&cs4231_driver);
2129} 2129}
2130 2130
2131module_init(cs4231_init); 2131module_init(cs4231_init);
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 1557bf132e7..39cd5d69d05 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -299,7 +299,7 @@ struct dbri_streaminfo {
299/* This structure holds the information for both chips (DBRI & CS4215) */ 299/* This structure holds the information for both chips (DBRI & CS4215) */
300struct snd_dbri { 300struct snd_dbri {
301 int regs_size, irq; /* Needed for unload */ 301 int regs_size, irq; /* Needed for unload */
302 struct of_device *op; /* OF device info */ 302 struct platform_device *op; /* OF device info */
303 spinlock_t lock; 303 spinlock_t lock;
304 304
305 struct dbri_dma *dma; /* Pointer to our DMA block */ 305 struct dbri_dma *dma; /* Pointer to our DMA block */
@@ -2523,7 +2523,7 @@ static void __devinit snd_dbri_proc(struct snd_card *card)
2523static void snd_dbri_free(struct snd_dbri *dbri); 2523static void snd_dbri_free(struct snd_dbri *dbri);
2524 2524
2525static int __devinit snd_dbri_create(struct snd_card *card, 2525static int __devinit snd_dbri_create(struct snd_card *card,
2526 struct of_device *op, 2526 struct platform_device *op,
2527 int irq, int dev) 2527 int irq, int dev)
2528{ 2528{
2529 struct snd_dbri *dbri = card->private_data; 2529 struct snd_dbri *dbri = card->private_data;
@@ -2592,7 +2592,7 @@ static void snd_dbri_free(struct snd_dbri *dbri)
2592 (void *)dbri->dma, dbri->dma_dvma); 2592 (void *)dbri->dma, dbri->dma_dvma);
2593} 2593}
2594 2594
2595static int __devinit dbri_probe(struct of_device *op, const struct of_device_id *match) 2595static int __devinit dbri_probe(struct platform_device *op, const struct of_device_id *match)
2596{ 2596{
2597 struct snd_dbri *dbri; 2597 struct snd_dbri *dbri;
2598 struct resource *rp; 2598 struct resource *rp;
@@ -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;
@@ -2662,7 +2662,7 @@ _err:
2662 return err; 2662 return err;
2663} 2663}
2664 2664
2665static int __devexit dbri_remove(struct of_device *op) 2665static int __devexit dbri_remove(struct platform_device *op)
2666{ 2666{
2667 struct snd_card *card = dev_get_drvdata(&op->dev); 2667 struct snd_card *card = dev_get_drvdata(&op->dev);
2668 2668
@@ -2699,12 +2699,12 @@ static struct of_platform_driver dbri_sbus_driver = {
2699/* Probe for the dbri chip and then attach the driver. */ 2699/* Probe for the dbri chip and then attach the driver. */
2700static int __init dbri_init(void) 2700static int __init dbri_init(void)
2701{ 2701{
2702 return of_register_driver(&dbri_sbus_driver, &of_bus_type); 2702 return of_register_platform_driver(&dbri_sbus_driver);
2703} 2703}
2704 2704
2705static void __exit dbri_exit(void) 2705static void __exit dbri_exit(void)
2706{ 2706{
2707 of_unregister_driver(&dbri_sbus_driver); 2707 of_unregister_platform_driver(&dbri_sbus_driver);
2708} 2708}
2709 2709
2710module_init(dbri_init); 2710module_init(dbri_init);
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 456829882f4..3634cedf930 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -636,7 +636,7 @@ static int hw_rule_period_time(struct snd_pcm_hw_params *params,
636 min_datainterval = min(min_datainterval, fp->datainterval); 636 min_datainterval = min(min_datainterval, fp->datainterval);
637 } 637 }
638 if (min_datainterval == 0xff) { 638 if (min_datainterval == 0xff) {
639 hwc_debug(" --> get emtpy\n"); 639 hwc_debug(" --> get empty\n");
640 it->empty = 1; 640 it->empty = 1;
641 return -EINVAL; 641 return -EINVAL;
642 } 642 }