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)
{
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;
}
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;
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)
{
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;
}
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;