diff options
Diffstat (limited to 'drivers/pnp/isapnp/proc.c')
-rw-r--r-- | drivers/pnp/isapnp/proc.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c index 40b724ebe23b..3fbc0f9ffc26 100644 --- a/drivers/pnp/isapnp/proc.c +++ b/drivers/pnp/isapnp/proc.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * ISA Plug & Play support | 2 | * ISA Plug & Play support |
3 | * Copyright (c) by Jaroslav Kysela <perex@suse.cz> | 3 | * Copyright (c) by Jaroslav Kysela <perex@suse.cz> |
4 | * | 4 | * |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
8 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
@@ -16,7 +15,6 @@ | |||
16 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | * | ||
20 | */ | 18 | */ |
21 | 19 | ||
22 | #include <linux/module.h> | 20 | #include <linux/module.h> |
@@ -54,7 +52,8 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) | |||
54 | return (file->f_pos = new); | 52 | return (file->f_pos = new); |
55 | } | 53 | } |
56 | 54 | ||
57 | static ssize_t isapnp_proc_bus_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) | 55 | static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, |
56 | size_t nbytes, loff_t * ppos) | ||
58 | { | 57 | { |
59 | struct inode *ino = file->f_path.dentry->d_inode; | 58 | struct inode *ino = file->f_path.dentry->d_inode; |
60 | struct proc_dir_entry *dp = PDE(ino); | 59 | struct proc_dir_entry *dp = PDE(ino); |
@@ -74,7 +73,7 @@ static ssize_t isapnp_proc_bus_read(struct file *file, char __user *buf, size_t | |||
74 | return -EINVAL; | 73 | return -EINVAL; |
75 | 74 | ||
76 | isapnp_cfg_begin(dev->card->number, dev->number); | 75 | isapnp_cfg_begin(dev->card->number, dev->number); |
77 | for ( ; pos < 256 && cnt > 0; pos++, buf++, cnt--) { | 76 | for (; pos < 256 && cnt > 0; pos++, buf++, cnt--) { |
78 | unsigned char val; | 77 | unsigned char val; |
79 | val = isapnp_read_byte(pos); | 78 | val = isapnp_read_byte(pos); |
80 | __put_user(val, buf); | 79 | __put_user(val, buf); |
@@ -85,10 +84,9 @@ static ssize_t isapnp_proc_bus_read(struct file *file, char __user *buf, size_t | |||
85 | return nbytes; | 84 | return nbytes; |
86 | } | 85 | } |
87 | 86 | ||
88 | static const struct file_operations isapnp_proc_bus_file_operations = | 87 | static const struct file_operations isapnp_proc_bus_file_operations = { |
89 | { | 88 | .llseek = isapnp_proc_bus_lseek, |
90 | .llseek = isapnp_proc_bus_lseek, | 89 | .read = isapnp_proc_bus_read, |
91 | .read = isapnp_proc_bus_read, | ||
92 | }; | 90 | }; |
93 | 91 | ||
94 | static int isapnp_proc_attach_device(struct pnp_dev *dev) | 92 | static int isapnp_proc_attach_device(struct pnp_dev *dev) |
@@ -139,13 +137,14 @@ static int __exit isapnp_proc_detach_bus(struct pnp_card *bus) | |||
139 | remove_proc_entry(name, isapnp_proc_bus_dir); | 137 | remove_proc_entry(name, isapnp_proc_bus_dir); |
140 | return 0; | 138 | return 0; |
141 | } | 139 | } |
142 | #endif /* MODULE */ | 140 | #endif /* MODULE */ |
143 | 141 | ||
144 | int __init isapnp_proc_init(void) | 142 | int __init isapnp_proc_init(void) |
145 | { | 143 | { |
146 | struct pnp_dev *dev; | 144 | struct pnp_dev *dev; |
145 | |||
147 | isapnp_proc_bus_dir = proc_mkdir("isapnp", proc_bus); | 146 | isapnp_proc_bus_dir = proc_mkdir("isapnp", proc_bus); |
148 | protocol_for_each_dev(&isapnp_protocol,dev) { | 147 | protocol_for_each_dev(&isapnp_protocol, dev) { |
149 | isapnp_proc_attach_device(dev); | 148 | isapnp_proc_attach_device(dev); |
150 | } | 149 | } |
151 | return 0; | 150 | return 0; |
@@ -167,4 +166,4 @@ int __exit isapnp_proc_done(void) | |||
167 | remove_proc_entry("isapnp", proc_bus); | 166 | remove_proc_entry("isapnp", proc_bus); |
168 | return 0; | 167 | return 0; |
169 | } | 168 | } |
170 | #endif /* MODULE */ | 169 | #endif /* MODULE */ |