Merge branch 'topic/hwdep-cleanup' into for-linus
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2009 23:35:41 +0000 (00:35 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2009 23:35:41 +0000 (00:35 +0100)
1  2 
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/hdspm.c

diff --combined sound/pci/rme9652/hdsp.c
@@@ -4413,13 -4413,6 +4413,6 @@@ static int snd_hdsp_capture_release(str
        return 0;
  }
  
- static int snd_hdsp_hwdep_dummy_op(struct snd_hwdep *hw, struct file *file)
- {
-       /* we have nothing to initialize but the call is required */
-       return 0;
- }
  /* helper functions for copying meter values */
  static inline int copy_u32_le(void __user *dest, void __iomem *src)
  {
@@@ -4738,9 -4731,7 +4731,7 @@@ static int snd_hdsp_create_hwdep(struc
        hw->private_data = hdsp;
        strcpy(hw->name, "HDSP hwdep interface");
  
-       hw->ops.open = snd_hdsp_hwdep_dummy_op;
        hw->ops.ioctl = snd_hdsp_hwdep_ioctl;
-       hw->ops.release = snd_hdsp_hwdep_dummy_op;
                
        return 0;
  }
@@@ -5158,10 -5149,8 +5149,10 @@@ static int __devinit snd_hdsp_probe(str
                return -ENOENT;
        }
  
 -      if (!(card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct hdsp))))
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev], THIS_MODULE,
 +                            sizeof(struct hdsp), &card);
 +      if (err < 0)
 +              return err;
  
        hdsp = (struct hdsp *) card->private_data;
        card->private_free = snd_hdsp_card_free;
@@@ -4100,13 -4100,6 +4100,6 @@@ static int snd_hdspm_capture_release(st
        return 0;
  }
  
- static int snd_hdspm_hwdep_dummy_op(struct snd_hwdep * hw, struct file *file)
- {
-       /* we have nothing to initialize but the call is required */
-       return 0;
- }
  static int snd_hdspm_hwdep_ioctl(struct snd_hwdep * hw, struct file *file,
                                 unsigned int cmd, unsigned long arg)
  {
@@@ -4213,9 -4206,7 +4206,7 @@@ static int __devinit snd_hdspm_create_h
        hw->private_data = hdspm;
        strcpy(hw->name, "HDSPM hwdep interface");
  
-       hw->ops.open = snd_hdspm_hwdep_dummy_op;
        hw->ops.ioctl = snd_hdspm_hwdep_ioctl;
-       hw->ops.release = snd_hdspm_hwdep_dummy_op;
  
        return 0;
  }
@@@ -4503,10 -4494,10 +4494,10 @@@ static int __devinit snd_hdspm_probe(st
                return -ENOENT;
        }
  
 -      card = snd_card_new(index[dev], id[dev],
 -                          THIS_MODULE, sizeof(struct hdspm));
 -      if (!card)
 -              return -ENOMEM;
 +      err = snd_card_create(index[dev], id[dev],
 +                            THIS_MODULE, sizeof(struct hdspm), &card);
 +      if (err < 0)
 +              return err;
  
        hdspm = card->private_data;
        card->private_free = snd_hdspm_card_free;