HID: Invert HWHEEL mappings for some Logitech mice
[pandora-kernel.git] / sound / oss / soundcard.c
index a89108c..7d89c08 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/ctype.h>
 #include <linux/stddef.h>
 #include <linux/kmod.h>
+#include <linux/kernel.h>
 #include <asm/dma.h>
 #include <asm/io.h>
 #include <linux/wait.h>
@@ -43,6 +44,7 @@
 #include <linux/smp_lock.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <linux/device.h>
 
 /*
  * This ought to be moved into include/asm/dma.h
@@ -482,7 +484,7 @@ static int sound_mmap(struct file *file, struct vm_area_struct *vma)
        return 0;
 }
 
-struct file_operations oss_sound_fops = {
+const struct file_operations oss_sound_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
        .read           = sound_read,
@@ -557,18 +559,20 @@ static int __init oss_init(void)
        /* Protecting the innocent */
        sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
 
-       for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
-               device_create(sound_class, NULL,
-                             MKDEV(SOUND_MAJOR, dev_list[i].minor),
-                             "%s", dev_list[i].name);
+       for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
+               device_create_drvdata(sound_class, NULL,
+                                     MKDEV(SOUND_MAJOR, dev_list[i].minor),
+                                     NULL, "%s", dev_list[i].name);
 
                if (!dev_list[i].num)
                        continue;
 
                for (j = 1; j < *dev_list[i].num; j++)
-                       device_create(sound_class, NULL,
-                                     MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
-                                     "%s%d", dev_list[i].name, j);
+                       device_create_drvdata(sound_class, NULL,
+                                             MKDEV(SOUND_MAJOR,
+                                                   dev_list[i].minor + (j*0x10)),
+                                             NULL,
+                                             "%s%d", dev_list[i].name, j);
        }
 
        if (sound_nblocks >= 1024)
@@ -581,7 +585,7 @@ static void __exit oss_cleanup(void)
 {
        int i, j;
 
-       for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
+       for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
                device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
                if (!dev_list[i].num)
                        continue;