*/
int snd_opl3_open(snd_hwdep_t * hw, struct file *file)
{
- opl3_t *opl3 = snd_magic_cast(opl3_t, hw->private_data, return -ENXIO);
+ opl3_t *opl3 = hw->private_data;
down(&opl3->access_mutex);
if (opl3->used) {
int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
unsigned int cmd, unsigned long arg)
{
- opl3_t *opl3 = snd_magic_cast(opl3_t, hw->private_data, return -ENXIO);
+ opl3_t *opl3 = hw->private_data;
void __user *argp = (void __user *)arg;
snd_assert(opl3 != NULL, return -EINVAL);
*/
int snd_opl3_release(snd_hwdep_t * hw, struct file *file)
{
- opl3_t *opl3 = snd_magic_cast(opl3_t, hw->private_data, return -ENXIO);
+ opl3_t *opl3 = hw->private_data;
snd_opl3_reset(opl3);
down(&opl3->access_mutex);