]> err.no Git - linux-2.6/blobdiff - sound/core/sound.c
Merge git://git.infradead.org/~dwmw2/rbtree-2.6
[linux-2.6] / sound / core / sound.c
index df4ab94d006e0f191058c6a9cb566310d3090188..108e430b50362dc10f65f97e73ecdc0992d93b62 100644 (file)
@@ -121,7 +121,7 @@ void *snd_lookup_minor_data(unsigned int minor, int type)
        struct snd_minor *mreg;
        void *private_data;
 
-       if (minor > ARRAY_SIZE(snd_minors))
+       if (minor >= ARRAY_SIZE(snd_minors))
                return NULL;
        mutex_lock(&sound_mutex);
        mreg = snd_minors[minor];
@@ -137,10 +137,10 @@ static int snd_open(struct inode *inode, struct file *file)
 {
        unsigned int minor = iminor(inode);
        struct snd_minor *mptr = NULL;
-       struct file_operations *old_fops;
+       const struct file_operations *old_fops;
        int err = 0;
 
-       if (minor > ARRAY_SIZE(snd_minors))
+       if (minor >= ARRAY_SIZE(snd_minors))
                return -ENODEV;
        mptr = snd_minors[minor];
        if (mptr == NULL) {
@@ -240,7 +240,7 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
  * Retrurns zero if successful, or a negative error code on failure.
  */
 int snd_register_device(int type, struct snd_card *card, int dev,
-                       struct file_operations *f_ops, void *private_data,
+                       const struct file_operations *f_ops, void *private_data,
                        const char *name)
 {
        int minor;