aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/sparc/dbri.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/sparc/dbri.c')
-rw-r--r--sound/sparc/dbri.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 913adc8568d5..050e98f32d36 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -69,14 +69,13 @@
#include <sound/initval.h>
#include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/platform_device.h>
#include <linux/atomic.h>
#include <linux/module.h>
MODULE_AUTHOR("Rudolf Koenig, Brent Baccala and Martin Habets");
MODULE_DESCRIPTION("Sun DBRI");
MODULE_LICENSE("GPL");
-MODULE_SUPPORTED_DEVICE("{{Sun,DBRI}}");
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
@@ -620,7 +619,7 @@ A circular command buffer is used here. A new command is being added
while another can be executed. The scheme works by adding two WAIT commands
after each sent batch of commands. When the next batch is prepared it is
added after the WAIT commands then the WAITs are replaced with single JUMP
-command to the new batch. The the DBRI is forced to reread the last WAIT
+command to the new batch. Then the DBRI is forced to reread the last WAIT
command (replaced by the JUMP by then). If the DBRI is still executing
previous commands the request to reread the WAIT command is ignored.
@@ -689,7 +688,7 @@ static void dbri_cmdsend(struct snd_dbri *dbri, s32 *cmd, int len)
{
u32 dvma_addr = (u32)dbri->dma_dvma;
s32 tmp, addr;
- static int wait_id = 0;
+ static int wait_id;
wait_id++;
wait_id &= 0xffff; /* restrict it to a 16 bit counter. */
@@ -1927,7 +1926,7 @@ static void dbri_process_interrupt_buffer(struct snd_dbri *dbri)
static irqreturn_t snd_dbri_interrupt(int irq, void *dev_id)
{
struct snd_dbri *dbri = dev_id;
- static int errcnt = 0;
+ static int errcnt;
int x;
if (dbri == NULL)
@@ -2227,11 +2226,12 @@ static int snd_dbri_pcm(struct snd_card *card)
struct snd_pcm *pcm;
int err;
- if ((err = snd_pcm_new(card,
- /* ID */ "sun_dbri",
- /* device */ 0,
- /* playback count */ 1,
- /* capture count */ 1, &pcm)) < 0)
+ err = snd_pcm_new(card,
+ /* ID */ "sun_dbri",
+ /* device */ 0,
+ /* playback count */ 1,
+ /* capture count */ 1, &pcm);
+ if (err < 0)
return err;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_dbri_ops);
@@ -2591,7 +2591,7 @@ static int dbri_probe(struct platform_device *op)
struct snd_dbri *dbri;
struct resource *rp;
struct snd_card *card;
- static int dev = 0;
+ static int dev;
int irq;
int err;
@@ -2656,14 +2656,12 @@ _err:
return err;
}
-static int dbri_remove(struct platform_device *op)
+static void dbri_remove(struct platform_device *op)
{
struct snd_card *card = dev_get_drvdata(&op->dev);
snd_dbri_free(card->private_data);
snd_card_free(card);
-
- return 0;
}
static const struct of_device_id dbri_match[] = {
@@ -2684,7 +2682,7 @@ static struct platform_driver dbri_sbus_driver = {
.of_match_table = dbri_match,
},
.probe = dbri_probe,
- .remove = dbri_remove,
+ .remove_new = dbri_remove,
};
module_platform_driver(dbri_sbus_driver);