Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / char / generic_nvram.c
index 1b5e01e..a00869c 100644 (file)
@@ -22,6 +22,9 @@
 #include <linux/smp_lock.h>
 #include <asm/uaccess.h>
 #include <asm/nvram.h>
+#ifdef CONFIG_PPC_PMAC
+#include <asm/machdep.h>
+#endif
 
 #define NVRAM_SIZE     8192
 
@@ -92,7 +95,7 @@ static int nvram_ioctl(struct inode *inode, struct file *file,
        case IOC_NVRAM_GET_OFFSET: {
                int part, offset;
 
-               if (_machine != _MACH_Pmac)
+               if (!machine_is(powermac))
                        return -EINVAL;
                if (copy_from_user(&part, (void __user*)arg, sizeof(part)) != 0)
                        return -EFAULT;
@@ -114,7 +117,7 @@ static int nvram_ioctl(struct inode *inode, struct file *file,
        return 0;
 }
 
-struct file_operations nvram_fops = {
+const struct file_operations nvram_fops = {
        .owner          = THIS_MODULE,
        .llseek         = nvram_llseek,
        .read           = read_nvram,
@@ -130,7 +133,7 @@ static struct miscdevice nvram_dev = {
 
 int __init nvram_init(void)
 {
-       printk(KERN_INFO "Macintosh non-volatile memory driver v%s\n",
+       printk(KERN_INFO "Generic non-volatile memory driver v%s\n",
                NVRAM_VERSION);
        return misc_register(&nvram_dev);
 }