diff options
Diffstat (limited to 'drivers/char/tipar.c')
-rw-r--r-- | drivers/char/tipar.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index d30dc09dbbc9..47fb20f69695 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c | |||
@@ -224,14 +224,16 @@ probe_ti_parallel(int minor) | |||
224 | { | 224 | { |
225 | int i; | 225 | int i; |
226 | int seq[] = { 0x00, 0x20, 0x10, 0x30 }; | 226 | int seq[] = { 0x00, 0x20, 0x10, 0x30 }; |
227 | int data; | ||
227 | 228 | ||
228 | for (i = 3; i >= 0; i--) { | 229 | for (i = 3; i >= 0; i--) { |
229 | outbyte(3, minor); | 230 | outbyte(3, minor); |
230 | outbyte(i, minor); | 231 | outbyte(i, minor); |
231 | udelay(delay); | 232 | udelay(delay); |
233 | data = inbyte(minor) & 0x30; | ||
232 | pr_debug("tipar: Probing -> %i: 0x%02x 0x%02x\n", i, | 234 | pr_debug("tipar: Probing -> %i: 0x%02x 0x%02x\n", i, |
233 | data & 0x30, seq[i]); | 235 | data, seq[i]); |
234 | if ((inbyte(minor) & 0x30) != seq[i]) { | 236 | if (data != seq[i]) { |
235 | outbyte(3, minor); | 237 | outbyte(3, minor); |
236 | return -1; | 238 | return -1; |
237 | } | 239 | } |
@@ -283,7 +285,7 @@ static ssize_t | |||
283 | tipar_write (struct file *file, const char __user *buf, size_t count, | 285 | tipar_write (struct file *file, const char __user *buf, size_t count, |
284 | loff_t * ppos) | 286 | loff_t * ppos) |
285 | { | 287 | { |
286 | unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR; | 288 | unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; |
287 | ssize_t n; | 289 | ssize_t n; |
288 | 290 | ||
289 | parport_claim_or_block(table[minor].dev); | 291 | parport_claim_or_block(table[minor].dev); |
@@ -311,7 +313,7 @@ static ssize_t | |||
311 | tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) | 313 | tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) |
312 | { | 314 | { |
313 | int b = 0; | 315 | int b = 0; |
314 | unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR; | 316 | unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; |
315 | ssize_t retval = 0; | 317 | ssize_t retval = 0; |
316 | ssize_t n = 0; | 318 | ssize_t n = 0; |
317 | 319 | ||