****************************************************************************/
 
 /* DBRI main registers */
-#define REG0   0x00UL          /* Status and Control */
-#define REG1   0x04UL          /* Mode and Interrupt */
-#define REG2   0x08UL          /* Parallel IO */
-#define REG3   0x0cUL          /* Test */
-#define REG8   0x20UL          /* Command Queue Pointer */
-#define REG9   0x24UL          /* Interrupt Queue Pointer */
+#define REG0   0x00            /* Status and Control */
+#define REG1   0x04            /* Mode and Interrupt */
+#define REG2   0x08            /* Parallel IO */
+#define REG3   0x0c            /* Test */
+#define REG8   0x20            /* Command Queue Pointer */
+#define REG9   0x24            /* Interrupt Queue Pointer */
 
 #define DBRI_NO_CMDS   64
 #define DBRI_INT_BLK   64
 /* Translate the ALSA direction into the array index */
 #define DBRI_STREAMNO(substream)                               \
                (substream->stream ==                           \
-                SNDRV_PCM_STREAM_PLAYBACK? DBRI_PLAY: DBRI_REC)
+                SNDRV_PCM_STREAM_PLAYBACK ? DBRI_PLAY: DBRI_REC)
 
 /* Return a pointer to dbri_streaminfo */
 #define DBRI_STREAM(dbri, substream)   \
 CPU interrupt to signal completion.
 
 Since the DBRI can run in parallel with the CPU, several means of
-synchronization present themselves. The method implemented here is only
-use of the dbri_cmdwait() to wait for execution of batch of sent commands.
+synchronization present themselves. The method implemented here uses
+the dbri_cmdwait() to wait for execution of batch of sent commands.
 
 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
        }
        spin_unlock_irqrestore(&dbri->lock, flags);
 
-       if (maxloops == 0) {
+       if (maxloops == 0)
                printk(KERN_ERR "DBRI: Chip never completed command buffer\n");
-       } else {
+       else
                dprintk(D_CMD, "Chip completed command buffer (%d)\n",
                        MAXLOOPS - maxloops - 1);
-       }
 }
 /*
- * Lock the command queue and returns pointer to a space for len cmd words
+ * Lock the command queue and return pointer to space for len cmd words
  * It locks the cmdlock spinlock.
  */
 static s32 *dbri_cmdlock(struct snd_dbri *dbri, int len)
 }
 
 /* Lock must not be held before calling this */
-static void dbri_initialize(struct snd_dbri *dbri)
+static void __init dbri_initialize(struct snd_dbri *dbri)
 {
        s32 *cmd;
        u32 dma_addr;
 here interface closely with the transmit and receive interrupt code.
 
 */
-static int pipe_active(struct snd_dbri *dbri, int pipe)
+static inline int pipe_active(struct snd_dbri *dbri, int pipe)
 {
        return ((pipe >= 0) && (dbri->pipes[pipe].desc != -1));
 }
                        if (!dbri->dma->desc[desc].ba)
                                break;
                }
+
                if (desc == DBRI_NO_DESCS) {
                        printk(KERN_ERR "DBRI: setup_descs: No descriptors\n");
                        return -1;
  * Lock must not be held before calling it.
 
 */
-static void cs4215_setup_pipes(struct snd_dbri *dbri)
+static __init void cs4215_setup_pipes(struct snd_dbri *dbri)
 {
        unsigned long flags;
 
        dbri_cmdwait(dbri);
 }
 
-static int cs4215_init_data(struct cs4215 *mm)
+static __init int cs4215_init_data(struct cs4215 *mm)
 {
        /*
         * No action, memory resetting only.
 /*
  *
  */
-static int cs4215_init(struct snd_dbri *dbri)
+static __init int cs4215_init(struct snd_dbri *dbri)
 {
        u32 reg2 = sbus_readl(dbri->regs + REG2);
        dprintk(D_MM, "cs4215_init: reg2=0x%x\n", reg2);
 
 static void transmission_complete_intr(struct snd_dbri *dbri, int pipe)
 {
-       struct dbri_streaminfo *info;
-       int td;
+       struct dbri_streaminfo *info = &dbri->stream_info[DBRI_PLAY];
+       int td = dbri->pipes[pipe].desc;
        int status;
 
-       info = &dbri->stream_info[DBRI_PLAY];
-
-       td = dbri->pipes[pipe].desc;
        while (td >= 0) {
                if (td >= DBRI_NO_DESCS) {
                        printk(KERN_ERR "DBRI: invalid td on pipe %d\n", pipe);
        }
 
        /* Notify ALSA */
-       if (spin_is_locked(&dbri->lock)) {
-               spin_unlock(&dbri->lock);
-               snd_pcm_period_elapsed(info->substream);
-               spin_lock(&dbri->lock);
-       } else
-               snd_pcm_period_elapsed(info->substream);
+       spin_unlock(&dbri->lock);
+       snd_pcm_period_elapsed(info->substream);
+       spin_lock(&dbri->lock);
 }
 
 static void reception_complete_intr(struct snd_dbri *dbri, int pipe)
                rd, DBRI_RD_STATUS(status), DBRI_RD_CNT(status));
 
        /* Notify ALSA */
-       if (spin_is_locked(&dbri->lock)) {
-               spin_unlock(&dbri->lock);
-               snd_pcm_period_elapsed(info->substream);
-               spin_lock(&dbri->lock);
-       } else
-               snd_pcm_period_elapsed(info->substream);
+       spin_unlock(&dbri->lock);
+       snd_pcm_period_elapsed(info->substream);
+       spin_lock(&dbri->lock);
 }
 
 static void dbri_process_one_interrupt(struct snd_dbri *dbri, int x)
                PCM Interface
 ****************************************************************************/
 static struct snd_pcm_hardware snd_dbri_pcm_hw = {
-       .info           = (SNDRV_PCM_INFO_MMAP |
-                          SNDRV_PCM_INFO_INTERLEAVED |
-                          SNDRV_PCM_INFO_BLOCK_TRANSFER |
-                          SNDRV_PCM_INFO_MMAP_VALID),
+       .info           = SNDRV_PCM_INFO_MMAP |
+                         SNDRV_PCM_INFO_INTERLEAVED |
+                         SNDRV_PCM_INFO_BLOCK_TRANSFER |
+                         SNDRV_PCM_INFO_MMAP_VALID,
        .formats        = SNDRV_PCM_FMTBIT_MU_LAW |
                          SNDRV_PCM_FMTBIT_A_LAW |
                          SNDRV_PCM_FMTBIT_U8 |
        .rate_max               = 48000,
        .channels_min           = 1,
        .channels_max           = 2,
-       .buffer_bytes_max       = (64 * 1024),
+       .buffer_bytes_max       = 64 * 1024,
        .period_bytes_min       = 1,
        .period_bytes_max       = DBRI_TD_MAXCNT,
        .periods_min            = 1,
        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count = 2;
        uinfo->value.integer.min = 0;
-       if (kcontrol->private_value == DBRI_PLAY) {
+       if (kcontrol->private_value == DBRI_PLAY)
                uinfo->value.integer.max = DBRI_MAX_VOLUME;
-       } else {
+       else
                uinfo->value.integer.max = DBRI_MAX_GAIN;
-       }
        return 0;
 }
 
                info->right_gain = ucontrol->value.integer.value[1];
                changed = 1;
        }
-       if (changed == 1) {
+       if (changed) {
                /* First mute outputs, and wait 1/8000 sec (125 us)
                 * to make sure this takes.  This avoids clicking noises.
                 */
        strcpy(card->mixername, card->shortname);
 
        for (idx = 0; idx < ARRAY_SIZE(dbri_controls); idx++) {
-               if ((err = snd_ctl_add(card,
-                               snd_ctl_new1(&dbri_controls[idx], dbri))) < 0)
+               err = snd_ctl_add(card,
+                               snd_ctl_new1(&dbri_controls[idx], dbri));
+               if (err < 0)
                        return err;
        }
 
                                    "Pipe %d: %s SDP=0x%x desc=%d, "
                                    "len=%d next %d\n",
                                    pipe,
-                                  ((pptr->sdp & D_SDP_TO_SER) ? "output" :
-                                                                "input"),
+                                  (pptr->sdp & D_SDP_TO_SER) ? "output" :
+                                                                "input",
                                    pptr->sdp, pptr->desc,
                                    pptr->length, pptr->nextpipe);
                }
                snd_info_set_text_ops(entry, dbri, dbri_regs_read);
 
 #ifdef DBRI_DEBUG
-       if (! snd_card_proc_new(dbri->card, "debug", &entry)) {
+       if (!snd_card_proc_new(dbri->card, "debug", &entry)) {
                snd_info_set_text_ops(entry, dbri, dbri_debug_read);
                entry->mode = S_IFREG | S_IRUGO;        /* Readable only. */
        }
        }
 
        dbri = card->private_data;
-       if ((err = snd_dbri_pcm(dbri)) < 0)
+       err = snd_dbri_pcm(dbri);
+       if (err < 0)
                goto _err;
 
-       if ((err = snd_dbri_mixer(dbri)) < 0)
-       if ((err = snd_dbri_mixer(dbri)) < 0)
+       err = snd_dbri_mixer(dbri);
+       if (err < 0)
                goto _err;
 
        /* /proc file handling */