diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-07 17:40:06 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-07-21 14:39:27 -0400 |
commit | dd378c2102cf4bf81144db70771d09ecead2cd15 (patch) | |
tree | 09baada8c6f0cccf3fad21c0739f2d8cbd3a7e44 /drivers/infiniband/hw | |
parent | cc323b2aaa3921c4eeec309ff64256b0c43ca752 (diff) |
IB/qib: Use generic_file_llseek
When the default llseek action gets changed to no_llseek, all file
systems relying on the current behaviour need to set explicit .llseek
operations.
In case of qib_fs, we want the files to be seekable, so
generic_file_llseek fits best.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_fs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c index 844954bf417b..9f989c0ba9d3 100644 --- a/drivers/infiniband/hw/qib/qib_fs.c +++ b/drivers/infiniband/hw/qib/qib_fs.c | |||
@@ -135,8 +135,8 @@ static ssize_t driver_names_read(struct file *file, char __user *buf, | |||
135 | } | 135 | } |
136 | 136 | ||
137 | static const struct file_operations driver_ops[] = { | 137 | static const struct file_operations driver_ops[] = { |
138 | { .read = driver_stats_read, }, | 138 | { .read = driver_stats_read, .llseek = generic_file_llseek, }, |
139 | { .read = driver_names_read, }, | 139 | { .read = driver_names_read, .llseek = generic_file_llseek, }, |
140 | }; | 140 | }; |
141 | 141 | ||
142 | /* read the per-device counters */ | 142 | /* read the per-device counters */ |
@@ -164,8 +164,8 @@ static ssize_t dev_names_read(struct file *file, char __user *buf, | |||
164 | } | 164 | } |
165 | 165 | ||
166 | static const struct file_operations cntr_ops[] = { | 166 | static const struct file_operations cntr_ops[] = { |
167 | { .read = dev_counters_read, }, | 167 | { .read = dev_counters_read, .llseek = generic_file_llseek, }, |
168 | { .read = dev_names_read, }, | 168 | { .read = dev_names_read, .llseek = generic_file_llseek, }, |
169 | }; | 169 | }; |
170 | 170 | ||
171 | /* | 171 | /* |
@@ -210,9 +210,9 @@ static ssize_t portcntrs_2_read(struct file *file, char __user *buf, | |||
210 | } | 210 | } |
211 | 211 | ||
212 | static const struct file_operations portcntr_ops[] = { | 212 | static const struct file_operations portcntr_ops[] = { |
213 | { .read = portnames_read, }, | 213 | { .read = portnames_read, .llseek = generic_file_llseek, }, |
214 | { .read = portcntrs_1_read, }, | 214 | { .read = portcntrs_1_read, .llseek = generic_file_llseek, }, |
215 | { .read = portcntrs_2_read, }, | 215 | { .read = portcntrs_2_read, .llseek = generic_file_llseek, }, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | /* | 218 | /* |
@@ -261,8 +261,8 @@ static ssize_t qsfp_2_read(struct file *file, char __user *buf, | |||
261 | } | 261 | } |
262 | 262 | ||
263 | static const struct file_operations qsfp_ops[] = { | 263 | static const struct file_operations qsfp_ops[] = { |
264 | { .read = qsfp_1_read, }, | 264 | { .read = qsfp_1_read, .llseek = generic_file_llseek, }, |
265 | { .read = qsfp_2_read, }, | 265 | { .read = qsfp_2_read, .llseek = generic_file_llseek, }, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | static ssize_t flash_read(struct file *file, char __user *buf, | 268 | static ssize_t flash_read(struct file *file, char __user *buf, |