]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/generic_nvram.c
Merge branch 'fixes-25' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6-omap-h63xx.git] / drivers / char / generic_nvram.c
index 1b5e01e6e129994e36b285ee29a842c241fd0c70..2398e864c28d98ab3d11dfb64fe39b9485c1a103 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,