projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] tifm __iomem annotations, NULL noise removal
[powerpc.git]
/
drivers
/
char
/
tipar.c
diff --git
a/drivers/char/tipar.c
b/drivers/char/tipar.c
index
e0633a1
..
9df0ca1
100644
(file)
--- a/
drivers/char/tipar.c
+++ b/
drivers/char/tipar.c
@@
-224,14
+224,16
@@
probe_ti_parallel(int minor)
{
int i;
int seq[] = { 0x00, 0x20, 0x10, 0x30 };
{
int i;
int seq[] = { 0x00, 0x20, 0x10, 0x30 };
+ int data;
for (i = 3; i >= 0; i--) {
outbyte(3, minor);
outbyte(i, minor);
udelay(delay);
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,
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;
}
outbyte(3, minor);
return -1;
}
@@
-381,7
+383,7
@@
tipar_ioctl(struct inode *inode, struct file *file,
/* ----- kernel module registering ------------------------------------ */
/* ----- 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,
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = tipar_read,