static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;     /* Index 0-MAX */
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;      /* ID for this card */
-static int enable[SNDRV_CARDS] = { 1,[1...(SNDRV_CARDS - 1)] = 1 };
+static int enable[SNDRV_CARDS] = { 1,[1 ... (SNDRV_CARDS - 1)] = 1 };
 
 module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, "Enable cx25821 soundcard. default enabled.");
                return (-ENOENT);
        }
 
-       card =
-           snd_card_new(index[devno], id[devno], THIS_MODULE,
-                        sizeof(snd_cx25821_card_t));
-       if (!card) {
+       err = snd_card_create(index[devno], id[devno], THIS_MODULE,
+                        sizeof(snd_cx25821_card_t), &card);
+       if (err < 0) {
                printk(KERN_INFO
                       "DEBUG ERROR: cannot create snd_card_new in %s\n",
                       __func__);
-               return (-ENOMEM);
+               return err;
        }
 
        strcpy(card->driver, "cx25821");
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "enable debug messages");
 
-static unsigned int card[] = {[0...(CX25821_MAXBOARDS - 1)] = UNSET };
+static unsigned int card[] = {[0 ... (CX25821_MAXBOARDS - 1)] = UNSET };
 module_param_array(card, int, NULL, 0444);
 MODULE_PARM_DESC(card, "card type");
 
 
 static struct i2c_adapter cx25821_i2c_adap_template = {
        .name = "cx25821",
        .owner = THIS_MODULE,
-       .id = I2C_HW_B_CX25821,
        .algo = &cx25821_i2c_algo_template,
 };
 
 
 MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>");
 MODULE_LICENSE("GPL");
 
-static unsigned int video_nr[] = {[0...(CX25821_MAXBOARDS - 1)] = UNSET };
-static unsigned int radio_nr[] = {[0...(CX25821_MAXBOARDS - 1)] = UNSET };
+static unsigned int video_nr[] = {[0 ... (CX25821_MAXBOARDS - 1)] = UNSET };
+static unsigned int radio_nr[] = {[0 ... (CX25821_MAXBOARDS - 1)] = UNSET };
 
 module_param_array(video_nr, int, NULL, 0444);
 module_param_array(radio_nr, int, NULL, 0444);