diff options
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 8081b637d97e..942db9de785e 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -11,8 +11,9 @@ | |||
11 | /* SYSFS attributes --------------------------------------------------------- */ | 11 | /* SYSFS attributes --------------------------------------------------------- */ |
12 | 12 | ||
13 | static ssize_t | 13 | static ssize_t |
14 | qla2x00_sysfs_read_fw_dump(struct kobject *kobj, char *buf, loff_t off, | 14 | qla2x00_sysfs_read_fw_dump(struct kobject *kobj, |
15 | size_t count) | 15 | struct bin_attribute *bin_attr, |
16 | char *buf, loff_t off, size_t count) | ||
16 | { | 17 | { |
17 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 18 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
18 | struct device, kobj))); | 19 | struct device, kobj))); |
@@ -31,8 +32,9 @@ qla2x00_sysfs_read_fw_dump(struct kobject *kobj, char *buf, loff_t off, | |||
31 | } | 32 | } |
32 | 33 | ||
33 | static ssize_t | 34 | static ssize_t |
34 | qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off, | 35 | qla2x00_sysfs_write_fw_dump(struct kobject *kobj, |
35 | size_t count) | 36 | struct bin_attribute *bin_attr, |
37 | char *buf, loff_t off, size_t count) | ||
36 | { | 38 | { |
37 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 39 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
38 | struct device, kobj))); | 40 | struct device, kobj))); |
@@ -73,7 +75,6 @@ static struct bin_attribute sysfs_fw_dump_attr = { | |||
73 | .attr = { | 75 | .attr = { |
74 | .name = "fw_dump", | 76 | .name = "fw_dump", |
75 | .mode = S_IRUSR | S_IWUSR, | 77 | .mode = S_IRUSR | S_IWUSR, |
76 | .owner = THIS_MODULE, | ||
77 | }, | 78 | }, |
78 | .size = 0, | 79 | .size = 0, |
79 | .read = qla2x00_sysfs_read_fw_dump, | 80 | .read = qla2x00_sysfs_read_fw_dump, |
@@ -81,8 +82,9 @@ static struct bin_attribute sysfs_fw_dump_attr = { | |||
81 | }; | 82 | }; |
82 | 83 | ||
83 | static ssize_t | 84 | static ssize_t |
84 | qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off, | 85 | qla2x00_sysfs_read_nvram(struct kobject *kobj, |
85 | size_t count) | 86 | struct bin_attribute *bin_attr, |
87 | char *buf, loff_t off, size_t count) | ||
86 | { | 88 | { |
87 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 89 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
88 | struct device, kobj))); | 90 | struct device, kobj))); |
@@ -101,8 +103,9 @@ qla2x00_sysfs_read_nvram(struct kobject *kobj, char *buf, loff_t off, | |||
101 | } | 103 | } |
102 | 104 | ||
103 | static ssize_t | 105 | static ssize_t |
104 | qla2x00_sysfs_write_nvram(struct kobject *kobj, char *buf, loff_t off, | 106 | qla2x00_sysfs_write_nvram(struct kobject *kobj, |
105 | size_t count) | 107 | struct bin_attribute *bin_attr, |
108 | char *buf, loff_t off, size_t count) | ||
106 | { | 109 | { |
107 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 110 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
108 | struct device, kobj))); | 111 | struct device, kobj))); |
@@ -149,7 +152,6 @@ static struct bin_attribute sysfs_nvram_attr = { | |||
149 | .attr = { | 152 | .attr = { |
150 | .name = "nvram", | 153 | .name = "nvram", |
151 | .mode = S_IRUSR | S_IWUSR, | 154 | .mode = S_IRUSR | S_IWUSR, |
152 | .owner = THIS_MODULE, | ||
153 | }, | 155 | }, |
154 | .size = 512, | 156 | .size = 512, |
155 | .read = qla2x00_sysfs_read_nvram, | 157 | .read = qla2x00_sysfs_read_nvram, |
@@ -157,8 +159,9 @@ static struct bin_attribute sysfs_nvram_attr = { | |||
157 | }; | 159 | }; |
158 | 160 | ||
159 | static ssize_t | 161 | static ssize_t |
160 | qla2x00_sysfs_read_optrom(struct kobject *kobj, char *buf, loff_t off, | 162 | qla2x00_sysfs_read_optrom(struct kobject *kobj, |
161 | size_t count) | 163 | struct bin_attribute *bin_attr, |
164 | char *buf, loff_t off, size_t count) | ||
162 | { | 165 | { |
163 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 166 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
164 | struct device, kobj))); | 167 | struct device, kobj))); |
@@ -176,8 +179,9 @@ qla2x00_sysfs_read_optrom(struct kobject *kobj, char *buf, loff_t off, | |||
176 | } | 179 | } |
177 | 180 | ||
178 | static ssize_t | 181 | static ssize_t |
179 | qla2x00_sysfs_write_optrom(struct kobject *kobj, char *buf, loff_t off, | 182 | qla2x00_sysfs_write_optrom(struct kobject *kobj, |
180 | size_t count) | 183 | struct bin_attribute *bin_attr, |
184 | char *buf, loff_t off, size_t count) | ||
181 | { | 185 | { |
182 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 186 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
183 | struct device, kobj))); | 187 | struct device, kobj))); |
@@ -198,7 +202,6 @@ static struct bin_attribute sysfs_optrom_attr = { | |||
198 | .attr = { | 202 | .attr = { |
199 | .name = "optrom", | 203 | .name = "optrom", |
200 | .mode = S_IRUSR | S_IWUSR, | 204 | .mode = S_IRUSR | S_IWUSR, |
201 | .owner = THIS_MODULE, | ||
202 | }, | 205 | }, |
203 | .size = OPTROM_SIZE_24XX, | 206 | .size = OPTROM_SIZE_24XX, |
204 | .read = qla2x00_sysfs_read_optrom, | 207 | .read = qla2x00_sysfs_read_optrom, |
@@ -206,8 +209,9 @@ static struct bin_attribute sysfs_optrom_attr = { | |||
206 | }; | 209 | }; |
207 | 210 | ||
208 | static ssize_t | 211 | static ssize_t |
209 | qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj, char *buf, loff_t off, | 212 | qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj, |
210 | size_t count) | 213 | struct bin_attribute *bin_attr, |
214 | char *buf, loff_t off, size_t count) | ||
211 | { | 215 | { |
212 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 216 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
213 | struct device, kobj))); | 217 | struct device, kobj))); |
@@ -279,15 +283,15 @@ static struct bin_attribute sysfs_optrom_ctl_attr = { | |||
279 | .attr = { | 283 | .attr = { |
280 | .name = "optrom_ctl", | 284 | .name = "optrom_ctl", |
281 | .mode = S_IWUSR, | 285 | .mode = S_IWUSR, |
282 | .owner = THIS_MODULE, | ||
283 | }, | 286 | }, |
284 | .size = 0, | 287 | .size = 0, |
285 | .write = qla2x00_sysfs_write_optrom_ctl, | 288 | .write = qla2x00_sysfs_write_optrom_ctl, |
286 | }; | 289 | }; |
287 | 290 | ||
288 | static ssize_t | 291 | static ssize_t |
289 | qla2x00_sysfs_read_vpd(struct kobject *kobj, char *buf, loff_t off, | 292 | qla2x00_sysfs_read_vpd(struct kobject *kobj, |
290 | size_t count) | 293 | struct bin_attribute *bin_attr, |
294 | char *buf, loff_t off, size_t count) | ||
291 | { | 295 | { |
292 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 296 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
293 | struct device, kobj))); | 297 | struct device, kobj))); |
@@ -305,8 +309,9 @@ qla2x00_sysfs_read_vpd(struct kobject *kobj, char *buf, loff_t off, | |||
305 | } | 309 | } |
306 | 310 | ||
307 | static ssize_t | 311 | static ssize_t |
308 | qla2x00_sysfs_write_vpd(struct kobject *kobj, char *buf, loff_t off, | 312 | qla2x00_sysfs_write_vpd(struct kobject *kobj, |
309 | size_t count) | 313 | struct bin_attribute *bin_attr, |
314 | char *buf, loff_t off, size_t count) | ||
310 | { | 315 | { |
311 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 316 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
312 | struct device, kobj))); | 317 | struct device, kobj))); |
@@ -327,7 +332,6 @@ static struct bin_attribute sysfs_vpd_attr = { | |||
327 | .attr = { | 332 | .attr = { |
328 | .name = "vpd", | 333 | .name = "vpd", |
329 | .mode = S_IRUSR | S_IWUSR, | 334 | .mode = S_IRUSR | S_IWUSR, |
330 | .owner = THIS_MODULE, | ||
331 | }, | 335 | }, |
332 | .size = 0, | 336 | .size = 0, |
333 | .read = qla2x00_sysfs_read_vpd, | 337 | .read = qla2x00_sysfs_read_vpd, |
@@ -335,8 +339,9 @@ static struct bin_attribute sysfs_vpd_attr = { | |||
335 | }; | 339 | }; |
336 | 340 | ||
337 | static ssize_t | 341 | static ssize_t |
338 | qla2x00_sysfs_read_sfp(struct kobject *kobj, char *buf, loff_t off, | 342 | qla2x00_sysfs_read_sfp(struct kobject *kobj, |
339 | size_t count) | 343 | struct bin_attribute *bin_attr, |
344 | char *buf, loff_t off, size_t count) | ||
340 | { | 345 | { |
341 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, | 346 | struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, |
342 | struct device, kobj))); | 347 | struct device, kobj))); |
@@ -375,7 +380,6 @@ static struct bin_attribute sysfs_sfp_attr = { | |||
375 | .attr = { | 380 | .attr = { |
376 | .name = "sfp", | 381 | .name = "sfp", |
377 | .mode = S_IRUSR | S_IWUSR, | 382 | .mode = S_IRUSR | S_IWUSR, |
378 | .owner = THIS_MODULE, | ||
379 | }, | 383 | }, |
380 | .size = SFP_DEV_SIZE * 2, | 384 | .size = SFP_DEV_SIZE * 2, |
381 | .read = qla2x00_sysfs_read_sfp, | 385 | .read = qla2x00_sysfs_read_sfp, |