proc.c (97eb3f24352ec6632c2127b35d8087d2a809a9b9) | proc.c (496ad9aa8ef448058e36ca7a787c61f2e63f0f54) |
---|---|
1/* 2 * ISA Plug & Play support 3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 16 unchanged lines hidden (view full) --- 25 26extern struct pnp_protocol isapnp_protocol; 27 28static struct proc_dir_entry *isapnp_proc_bus_dir = NULL; 29 30static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) 31{ 32 loff_t new = -1; | 1/* 2 * ISA Plug & Play support 3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 16 unchanged lines hidden (view full) --- 25 26extern struct pnp_protocol isapnp_protocol; 27 28static struct proc_dir_entry *isapnp_proc_bus_dir = NULL; 29 30static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) 31{ 32 loff_t new = -1; |
33 struct inode *inode = file->f_path.dentry->d_inode; | 33 struct inode *inode = file_inode(file); |
34 35 mutex_lock(&inode->i_mutex); 36 switch (whence) { 37 case 0: 38 new = off; 39 break; 40 case 1: 41 new = file->f_pos + off; --- 8 unchanged lines hidden (view full) --- 50 file->f_pos = new; 51 mutex_unlock(&inode->i_mutex); 52 return new; 53} 54 55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, 56 size_t nbytes, loff_t * ppos) 57{ | 34 35 mutex_lock(&inode->i_mutex); 36 switch (whence) { 37 case 0: 38 new = off; 39 break; 40 case 1: 41 new = file->f_pos + off; --- 8 unchanged lines hidden (view full) --- 50 file->f_pos = new; 51 mutex_unlock(&inode->i_mutex); 52 return new; 53} 54 55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, 56 size_t nbytes, loff_t * ppos) 57{ |
58 struct inode *ino = file->f_path.dentry->d_inode; | 58 struct inode *ino = file_inode(file); |
59 struct proc_dir_entry *dp = PDE(ino); 60 struct pnp_dev *dev = dp->data; 61 int pos = *ppos; 62 int cnt, size = 256; 63 64 if (pos >= size) 65 return 0; 66 if (nbytes >= size) --- 57 unchanged lines hidden --- | 59 struct proc_dir_entry *dp = PDE(ino); 60 struct pnp_dev *dev = dp->data; 61 int pos = *ppos; 62 int cnt, size = 256; 63 64 if (pos >= size) 65 return 0; 66 if (nbytes >= size) --- 57 unchanged lines hidden --- |