Skip to content

Commit 1f98c3d

Browse files
author
Fox Snowpatch
committed
1 parent 2dd0957 commit 1f98c3d

File tree

13 files changed

+121
-121
lines changed

13 files changed

+121
-121
lines changed

drivers/scsi/3w-sas.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int twl_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res
9696

9797
/* This function returns AENs through sysfs */
9898
static ssize_t twl_sysfs_aen_read(struct file *filp, struct kobject *kobj,
99-
struct bin_attribute *bin_attr,
99+
const struct bin_attribute *bin_attr,
100100
char *outbuf, loff_t offset, size_t count)
101101
{
102102
struct device *dev = container_of(kobj, struct device, kobj);
@@ -116,18 +116,18 @@ static ssize_t twl_sysfs_aen_read(struct file *filp, struct kobject *kobj,
116116
} /* End twl_sysfs_aen_read() */
117117

118118
/* aen_read sysfs attribute initializer */
119-
static struct bin_attribute twl_sysfs_aen_read_attr = {
119+
static const struct bin_attribute twl_sysfs_aen_read_attr = {
120120
.attr = {
121121
.name = "3ware_aen_read",
122122
.mode = S_IRUSR,
123123
},
124124
.size = 0,
125-
.read = twl_sysfs_aen_read
125+
.read_new = twl_sysfs_aen_read
126126
};
127127

128128
/* This function returns driver compatibility info through sysfs */
129129
static ssize_t twl_sysfs_compat_info(struct file *filp, struct kobject *kobj,
130-
struct bin_attribute *bin_attr,
130+
const struct bin_attribute *bin_attr,
131131
char *outbuf, loff_t offset, size_t count)
132132
{
133133
struct device *dev = container_of(kobj, struct device, kobj);
@@ -147,13 +147,13 @@ static ssize_t twl_sysfs_compat_info(struct file *filp, struct kobject *kobj,
147147
} /* End twl_sysfs_compat_info() */
148148

149149
/* compat_info sysfs attribute initializer */
150-
static struct bin_attribute twl_sysfs_compat_info_attr = {
150+
static const struct bin_attribute twl_sysfs_compat_info_attr = {
151151
.attr = {
152152
.name = "3ware_compat_info",
153153
.mode = S_IRUSR,
154154
},
155155
.size = 0,
156-
.read = twl_sysfs_compat_info
156+
.read_new = twl_sysfs_compat_info
157157
};
158158

159159
/* Show some statistics about the card */

drivers/scsi/arcmsr/arcmsr_attr.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
static ssize_t arcmsr_sysfs_iop_message_read(struct file *filp,
6262
struct kobject *kobj,
63-
struct bin_attribute *bin,
63+
const struct bin_attribute *bin,
6464
char *buf, loff_t off,
6565
size_t count)
6666
{
@@ -107,7 +107,7 @@ static ssize_t arcmsr_sysfs_iop_message_read(struct file *filp,
107107

108108
static ssize_t arcmsr_sysfs_iop_message_write(struct file *filp,
109109
struct kobject *kobj,
110-
struct bin_attribute *bin,
110+
const struct bin_attribute *bin,
111111
char *buf, loff_t off,
112112
size_t count)
113113
{
@@ -155,7 +155,7 @@ static ssize_t arcmsr_sysfs_iop_message_write(struct file *filp,
155155

156156
static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp,
157157
struct kobject *kobj,
158-
struct bin_attribute *bin,
158+
const struct bin_attribute *bin,
159159
char *buf, loff_t off,
160160
size_t count)
161161
{
@@ -194,7 +194,7 @@ static const struct bin_attribute arcmsr_sysfs_message_read_attr = {
194194
.mode = S_IRUSR ,
195195
},
196196
.size = ARCMSR_API_DATA_BUFLEN,
197-
.read = arcmsr_sysfs_iop_message_read,
197+
.read_new = arcmsr_sysfs_iop_message_read,
198198
};
199199

200200
static const struct bin_attribute arcmsr_sysfs_message_write_attr = {
@@ -203,7 +203,7 @@ static const struct bin_attribute arcmsr_sysfs_message_write_attr = {
203203
.mode = S_IWUSR,
204204
},
205205
.size = ARCMSR_API_DATA_BUFLEN,
206-
.write = arcmsr_sysfs_iop_message_write,
206+
.write_new = arcmsr_sysfs_iop_message_write,
207207
};
208208

209209
static const struct bin_attribute arcmsr_sysfs_message_clear_attr = {
@@ -212,7 +212,7 @@ static const struct bin_attribute arcmsr_sysfs_message_clear_attr = {
212212
.mode = S_IWUSR,
213213
},
214214
.size = 1,
215-
.write = arcmsr_sysfs_iop_message_clear,
215+
.write_new = arcmsr_sysfs_iop_message_clear,
216216
};
217217

218218
int arcmsr_alloc_sysfs_attr(struct AdapterControlBlock *acb)

drivers/scsi/esas2r/esas2r.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -1411,11 +1411,11 @@ static inline void esas2r_comp_list_drain(struct esas2r_adapter *a,
14111411
}
14121412

14131413
/* sysfs handlers */
1414-
extern struct bin_attribute bin_attr_fw;
1415-
extern struct bin_attribute bin_attr_fs;
1416-
extern struct bin_attribute bin_attr_vda;
1417-
extern struct bin_attribute bin_attr_hw;
1418-
extern struct bin_attribute bin_attr_live_nvram;
1419-
extern struct bin_attribute bin_attr_default_nvram;
1414+
extern const struct bin_attribute bin_attr_fw;
1415+
extern const struct bin_attribute bin_attr_fs;
1416+
extern const struct bin_attribute bin_attr_vda;
1417+
extern const struct bin_attribute bin_attr_hw;
1418+
extern const struct bin_attribute bin_attr_live_nvram;
1419+
extern const struct bin_attribute bin_attr_default_nvram;
14201420

14211421
#endif /* ESAS2R_H */

drivers/scsi/esas2r/esas2r_main.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static struct esas2r_adapter *esas2r_adapter_from_kobj(struct kobject *kobj)
6666
}
6767

6868
static ssize_t read_fw(struct file *file, struct kobject *kobj,
69-
struct bin_attribute *attr,
69+
const struct bin_attribute *attr,
7070
char *buf, loff_t off, size_t count)
7171
{
7272
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -75,7 +75,7 @@ static ssize_t read_fw(struct file *file, struct kobject *kobj,
7575
}
7676

7777
static ssize_t write_fw(struct file *file, struct kobject *kobj,
78-
struct bin_attribute *attr,
78+
const struct bin_attribute *attr,
7979
char *buf, loff_t off, size_t count)
8080
{
8181
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -84,7 +84,7 @@ static ssize_t write_fw(struct file *file, struct kobject *kobj,
8484
}
8585

8686
static ssize_t read_fs(struct file *file, struct kobject *kobj,
87-
struct bin_attribute *attr,
87+
const struct bin_attribute *attr,
8888
char *buf, loff_t off, size_t count)
8989
{
9090
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -93,7 +93,7 @@ static ssize_t read_fs(struct file *file, struct kobject *kobj,
9393
}
9494

9595
static ssize_t write_fs(struct file *file, struct kobject *kobj,
96-
struct bin_attribute *attr,
96+
const struct bin_attribute *attr,
9797
char *buf, loff_t off, size_t count)
9898
{
9999
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -109,7 +109,7 @@ static ssize_t write_fs(struct file *file, struct kobject *kobj,
109109
}
110110

111111
static ssize_t read_vda(struct file *file, struct kobject *kobj,
112-
struct bin_attribute *attr,
112+
const struct bin_attribute *attr,
113113
char *buf, loff_t off, size_t count)
114114
{
115115
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -118,7 +118,7 @@ static ssize_t read_vda(struct file *file, struct kobject *kobj,
118118
}
119119

120120
static ssize_t write_vda(struct file *file, struct kobject *kobj,
121-
struct bin_attribute *attr,
121+
const struct bin_attribute *attr,
122122
char *buf, loff_t off, size_t count)
123123
{
124124
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -127,7 +127,7 @@ static ssize_t write_vda(struct file *file, struct kobject *kobj,
127127
}
128128

129129
static ssize_t read_live_nvram(struct file *file, struct kobject *kobj,
130-
struct bin_attribute *attr,
130+
const struct bin_attribute *attr,
131131
char *buf, loff_t off, size_t count)
132132
{
133133
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -138,7 +138,7 @@ static ssize_t read_live_nvram(struct file *file, struct kobject *kobj,
138138
}
139139

140140
static ssize_t write_live_nvram(struct file *file, struct kobject *kobj,
141-
struct bin_attribute *attr,
141+
const struct bin_attribute *attr,
142142
char *buf, loff_t off, size_t count)
143143
{
144144
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -158,7 +158,7 @@ static ssize_t write_live_nvram(struct file *file, struct kobject *kobj,
158158
}
159159

160160
static ssize_t read_default_nvram(struct file *file, struct kobject *kobj,
161-
struct bin_attribute *attr,
161+
const struct bin_attribute *attr,
162162
char *buf, loff_t off, size_t count)
163163
{
164164
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -169,7 +169,7 @@ static ssize_t read_default_nvram(struct file *file, struct kobject *kobj,
169169
}
170170

171171
static ssize_t read_hw(struct file *file, struct kobject *kobj,
172-
struct bin_attribute *attr,
172+
const struct bin_attribute *attr,
173173
char *buf, loff_t off, size_t count)
174174
{
175175
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -187,7 +187,7 @@ static ssize_t read_hw(struct file *file, struct kobject *kobj,
187187
}
188188

189189
static ssize_t write_hw(struct file *file, struct kobject *kobj,
190-
struct bin_attribute *attr,
190+
const struct bin_attribute *attr,
191191
char *buf, loff_t off, size_t count)
192192
{
193193
struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj);
@@ -211,23 +211,23 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj,
211211
}
212212

213213
#define ESAS2R_RW_BIN_ATTR(_name) \
214-
struct bin_attribute bin_attr_ ## _name = { \
214+
const struct bin_attribute bin_attr_ ## _name = { \
215215
.attr = \
216216
{ .name = __stringify(_name), .mode = S_IRUSR | S_IWUSR }, \
217217
.size = 0, \
218-
.read = read_ ## _name, \
219-
.write = write_ ## _name }
218+
.read_new = read_ ## _name, \
219+
.write_new = write_ ## _name }
220220

221221
ESAS2R_RW_BIN_ATTR(fw);
222222
ESAS2R_RW_BIN_ATTR(fs);
223223
ESAS2R_RW_BIN_ATTR(vda);
224224
ESAS2R_RW_BIN_ATTR(hw);
225225
ESAS2R_RW_BIN_ATTR(live_nvram);
226226

227-
struct bin_attribute bin_attr_default_nvram = {
227+
const struct bin_attribute bin_attr_default_nvram = {
228228
.attr = { .name = "default_nvram", .mode = S_IRUGO },
229229
.size = 0,
230-
.read = read_default_nvram,
230+
.read_new = read_default_nvram,
231231
.write = NULL
232232
};
233233

drivers/scsi/ibmvscsi/ibmvfc.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -3639,7 +3639,7 @@ static DEVICE_ATTR(nr_scsi_channels, S_IRUGO | S_IWUSR,
36393639
* number of bytes printed to buffer
36403640
**/
36413641
static ssize_t ibmvfc_read_trace(struct file *filp, struct kobject *kobj,
3642-
struct bin_attribute *bin_attr,
3642+
const struct bin_attribute *bin_attr,
36433643
char *buf, loff_t off, size_t count)
36443644
{
36453645
struct device *dev = kobj_to_dev(kobj);
@@ -3662,13 +3662,13 @@ static ssize_t ibmvfc_read_trace(struct file *filp, struct kobject *kobj,
36623662
return count;
36633663
}
36643664

3665-
static struct bin_attribute ibmvfc_trace_attr = {
3665+
static const struct bin_attribute ibmvfc_trace_attr = {
36663666
.attr = {
36673667
.name = "trace",
36683668
.mode = S_IRUGO,
36693669
},
36703670
.size = 0,
3671-
.read = ibmvfc_read_trace,
3671+
.read_new = ibmvfc_read_trace,
36723672
};
36733673
#endif
36743674

drivers/scsi/ipr.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -3366,7 +3366,7 @@ static void ipr_worker_thread(struct work_struct *work)
33663366
* number of bytes printed to buffer
33673367
**/
33683368
static ssize_t ipr_read_trace(struct file *filp, struct kobject *kobj,
3369-
struct bin_attribute *bin_attr,
3369+
const struct bin_attribute *bin_attr,
33703370
char *buf, loff_t off, size_t count)
33713371
{
33723372
struct device *dev = kobj_to_dev(kobj);
@@ -3383,13 +3383,13 @@ static ssize_t ipr_read_trace(struct file *filp, struct kobject *kobj,
33833383
return ret;
33843384
}
33853385

3386-
static struct bin_attribute ipr_trace_attr = {
3386+
static const struct bin_attribute ipr_trace_attr = {
33873387
.attr = {
33883388
.name = "trace",
33893389
.mode = S_IRUGO,
33903390
},
33913391
.size = 0,
3392-
.read = ipr_read_trace,
3392+
.read_new = ipr_read_trace,
33933393
};
33943394
#endif
33953395

@@ -4087,7 +4087,7 @@ static struct device_attribute ipr_ioa_fw_type_attr = {
40874087
};
40884088

40894089
static ssize_t ipr_read_async_err_log(struct file *filep, struct kobject *kobj,
4090-
struct bin_attribute *bin_attr, char *buf,
4090+
const struct bin_attribute *bin_attr, char *buf,
40914091
loff_t off, size_t count)
40924092
{
40934093
struct device *cdev = kobj_to_dev(kobj);
@@ -4111,7 +4111,7 @@ static ssize_t ipr_read_async_err_log(struct file *filep, struct kobject *kobj,
41114111
}
41124112

41134113
static ssize_t ipr_next_async_err_log(struct file *filep, struct kobject *kobj,
4114-
struct bin_attribute *bin_attr, char *buf,
4114+
const struct bin_attribute *bin_attr, char *buf,
41154115
loff_t off, size_t count)
41164116
{
41174117
struct device *cdev = kobj_to_dev(kobj);
@@ -4134,14 +4134,14 @@ static ssize_t ipr_next_async_err_log(struct file *filep, struct kobject *kobj,
41344134
return count;
41354135
}
41364136

4137-
static struct bin_attribute ipr_ioa_async_err_log = {
4137+
static const struct bin_attribute ipr_ioa_async_err_log = {
41384138
.attr = {
41394139
.name = "async_err_log",
41404140
.mode = S_IRUGO | S_IWUSR,
41414141
},
41424142
.size = 0,
4143-
.read = ipr_read_async_err_log,
4144-
.write = ipr_next_async_err_log
4143+
.read_new = ipr_read_async_err_log,
4144+
.write_new = ipr_next_async_err_log
41454145
};
41464146

41474147
static struct attribute *ipr_ioa_attrs[] = {
@@ -4172,7 +4172,7 @@ ATTRIBUTE_GROUPS(ipr_ioa);
41724172
* number of bytes printed to buffer
41734173
**/
41744174
static ssize_t ipr_read_dump(struct file *filp, struct kobject *kobj,
4175-
struct bin_attribute *bin_attr,
4175+
const struct bin_attribute *bin_attr,
41764176
char *buf, loff_t off, size_t count)
41774177
{
41784178
struct device *cdev = kobj_to_dev(kobj);
@@ -4361,7 +4361,7 @@ static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg)
43614361
* number of bytes printed to buffer
43624362
**/
43634363
static ssize_t ipr_write_dump(struct file *filp, struct kobject *kobj,
4364-
struct bin_attribute *bin_attr,
4364+
const struct bin_attribute *bin_attr,
43654365
char *buf, loff_t off, size_t count)
43664366
{
43674367
struct device *cdev = kobj_to_dev(kobj);
@@ -4385,14 +4385,14 @@ static ssize_t ipr_write_dump(struct file *filp, struct kobject *kobj,
43854385
return count;
43864386
}
43874387

4388-
static struct bin_attribute ipr_dump_attr = {
4388+
static const struct bin_attribute ipr_dump_attr = {
43894389
.attr = {
43904390
.name = "dump",
43914391
.mode = S_IRUSR | S_IWUSR,
43924392
},
43934393
.size = 0,
4394-
.read = ipr_read_dump,
4395-
.write = ipr_write_dump
4394+
.read_new = ipr_read_dump,
4395+
.write_new = ipr_write_dump
43964396
};
43974397
#else
43984398
static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg) { return 0; };

0 commit comments

Comments
 (0)