sound.c (11ed56fb7899f9eb9eaef8e5919db1bf08f1b07e) | sound.c (99ac48f54a91d02140c497edc31dc57d4bc5c85d) |
---|---|
1/* 2 * Advanced Linux Sound Architecture 3 * Copyright (c) by Jaroslav Kysela <perex@suse.cz> 4 * 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 123 unchanged lines hidden (view full) --- 132 mutex_unlock(&sound_mutex); 133 return private_data; 134} 135 136static int snd_open(struct inode *inode, struct file *file) 137{ 138 unsigned int minor = iminor(inode); 139 struct snd_minor *mptr = NULL; | 1/* 2 * Advanced Linux Sound Architecture 3 * Copyright (c) by Jaroslav Kysela <perex@suse.cz> 4 * 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 123 unchanged lines hidden (view full) --- 132 mutex_unlock(&sound_mutex); 133 return private_data; 134} 135 136static int snd_open(struct inode *inode, struct file *file) 137{ 138 unsigned int minor = iminor(inode); 139 struct snd_minor *mptr = NULL; |
140 struct file_operations *old_fops; | 140 const struct file_operations *old_fops; |
141 int err = 0; 142 143 if (minor >= ARRAY_SIZE(snd_minors)) 144 return -ENODEV; 145 mptr = snd_minors[minor]; 146 if (mptr == NULL) { 147#ifdef CONFIG_KMOD 148 int dev = SNDRV_MINOR_DEVICE(minor); --- 86 unchanged lines hidden (view full) --- 235 * @name: the device file name 236 * 237 * Registers an ALSA device file for the given card. 238 * The operators have to be set in reg parameter. 239 * 240 * Retrurns zero if successful, or a negative error code on failure. 241 */ 242int snd_register_device(int type, struct snd_card *card, int dev, | 141 int err = 0; 142 143 if (minor >= ARRAY_SIZE(snd_minors)) 144 return -ENODEV; 145 mptr = snd_minors[minor]; 146 if (mptr == NULL) { 147#ifdef CONFIG_KMOD 148 int dev = SNDRV_MINOR_DEVICE(minor); --- 86 unchanged lines hidden (view full) --- 235 * @name: the device file name 236 * 237 * Registers an ALSA device file for the given card. 238 * The operators have to be set in reg parameter. 239 * 240 * Retrurns zero if successful, or a negative error code on failure. 241 */ 242int snd_register_device(int type, struct snd_card *card, int dev, |
243 struct file_operations *f_ops, void *private_data, | 243 const struct file_operations *f_ops, void *private_data, |
244 const char *name) 245{ 246 int minor; 247 struct snd_minor *preg; 248 struct device *device = NULL; 249 250 snd_assert(name, return -EINVAL); 251 preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); --- 285 unchanged lines hidden --- | 244 const char *name) 245{ 246 int minor; 247 struct snd_minor *preg; 248 struct device *device = NULL; 249 250 snd_assert(name, return -EINVAL); 251 preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); --- 285 unchanged lines hidden --- |