Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[pandora-kernel.git] / drivers / char / tipar.c
index 48476f8..9df0ca1 100644 (file)
@@ -42,7 +42,6 @@
  */
 #undef DEBUG                           /* change to #define to get debugging
                                         * output - for pr_debug() */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/errno.h>
@@ -56,7 +55,6 @@
 #include <linux/ioport.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
-#include <linux/devfs_fs_kernel.h>     /* DevFs support */
 #include <linux/parport.h>             /* Our code depend on parport */
 #include <linux/device.h>
 
@@ -226,14 +224,16 @@ probe_ti_parallel(int minor)
 {
        int i;
        int seq[] = { 0x00, 0x20, 0x10, 0x30 };
+       int data;
 
        for (i = 3; i >= 0; i--) {
                outbyte(3, minor);
                outbyte(i, minor);
                udelay(delay);
+               data = inbyte(minor) & 0x30;
                pr_debug("tipar: Probing -> %i: 0x%02x 0x%02x\n", i,
-                       data & 0x30, seq[i]);
-               if ((inbyte(minor) & 0x30) != seq[i]) {
+                       data, seq[i]);
+               if (data != seq[i]) {
                        outbyte(3, minor);
                        return -1;
                }
@@ -383,7 +383,7 @@ tipar_ioctl(struct inode *inode, struct file *file,
 
 /* ----- kernel module registering ------------------------------------ */
 
-static struct file_operations tipar_fops = {
+static const struct file_operations tipar_fops = {
        .owner = THIS_MODULE,
        .llseek = no_llseek,
        .read = tipar_read,