Merge branch 'r8169-for-jeff-20070806' of git://electric-eye.fr.zoreil.com/home/romie...
[sfrench/cifs-2.6.git] / sound / sparc / dbri.c
index e4935fca12dff57c88b3417ea154eb80cacbfe54..e07085a7cfc340baafc170f3cd876c2f2980c694 100644 (file)
@@ -669,16 +669,16 @@ static s32 *dbri_cmdlock(struct snd_dbri * dbri, int len)
        else
                printk(KERN_ERR "DBRI: no space for commands.");
 
-       return 0;
+       return NULL;
 }
 
 /*
- * Send prepared cmd string. It works by writting a JUMP cmd into
+ * Send prepared cmd string. It works by writing a JUMP cmd into
  * the last WAIT cmd and force DBRI to reread the cmd.
  * The JUMP cmd points to the new cmd string.
  * It also releases the cmdlock spinlock.
  *
- * Lock must not be held before calling this.
+ * Lock must be held before calling this.
  */
 static void dbri_cmdsend(struct snd_dbri * dbri, s32 * cmd,int len)
 {
@@ -1903,8 +1903,7 @@ static void dbri_process_interrupt_buffer(struct snd_dbri * dbri)
        }
 }
 
-static irqreturn_t snd_dbri_interrupt(int irq, void *dev_id,
-                                     struct pt_regs *regs)
+static irqreturn_t snd_dbri_interrupt(int irq, void *dev_id)
 {
        struct snd_dbri *dbri = dev_id;
        static int errcnt = 0;
@@ -2037,10 +2036,10 @@ static int snd_dbri_open(struct snd_pcm_substream *substream)
        spin_unlock_irqrestore(&dbri->lock, flags);
 
        snd_pcm_hw_rule_add(runtime,0,SNDRV_PCM_HW_PARAM_CHANNELS,
-                           snd_hw_rule_format, 0, SNDRV_PCM_HW_PARAM_FORMAT,
+                           snd_hw_rule_format, NULL, SNDRV_PCM_HW_PARAM_FORMAT,
                            -1);
        snd_pcm_hw_rule_add(runtime,0,SNDRV_PCM_HW_PARAM_FORMAT,
-                           snd_hw_rule_channels, 0
+                           snd_hw_rule_channels, NULL
                            SNDRV_PCM_HW_PARAM_CHANNELS,
                            -1);
                                
@@ -2412,8 +2411,6 @@ static struct snd_kcontrol_new dbri_controls[] __devinitdata = {
        CS4215_SINGLE("Mic boost", 4, 4, 1, 1)
 };
 
-#define NUM_CS4215_CONTROLS (sizeof(dbri_controls)/sizeof(struct snd_kcontrol_new))
-
 static int __init snd_dbri_mixer(struct snd_dbri * dbri)
 {
        struct snd_card *card;
@@ -2424,7 +2421,7 @@ static int __init snd_dbri_mixer(struct snd_dbri * dbri)
        card = dbri->card;
        strcpy(card->mixername, card->shortname);
 
-       for (idx = 0; idx < NUM_CS4215_CONTROLS; idx++) {
+       for (idx = 0; idx < ARRAY_SIZE(dbri_controls); idx++) {
                if ((err = snd_ctl_add(card,
                                snd_ctl_new1(&dbri_controls[idx], dbri))) < 0)
                        return err;