20 #include <linux/module.h>
24 #include <asm/uaccess.h>
30 static loff_t isapnp_proc_bus_lseek(
struct file *
file, loff_t off,
int whence)
41 new = file->
f_pos + off;
47 if (new < 0 || new > 256)
55 static ssize_t isapnp_proc_bus_read(
struct file *file,
char __user *
buf,
56 size_t nbytes, loff_t * ppos)
58 struct inode *
ino = file->
f_path.dentry->d_inode;
68 if (pos + nbytes > size)
76 for (; pos < 256 && cnt > 0; pos++, buf++, cnt--) {
89 .llseek = isapnp_proc_bus_lseek,
90 .read = isapnp_proc_bus_read,
93 static int isapnp_proc_attach_device(
struct pnp_dev *dev)
107 &isapnp_proc_bus_file_operations, dev);
120 isapnp_proc_attach_device(dev);