diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-23 23:11:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:54:55 -0500 |
commit | 587a1f1659e8b330b8738ef4901832a2b63f0bed (patch) | |
tree | b785c3f44ddba6ee036e02268502cdc961f55ea0 /drivers | |
parent | 9104e427f3e21ddb380ddc39752624365b5bffea (diff) |
switch ->is_visible() to returning umode_t
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
29 files changed, 63 insertions, 63 deletions
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 2cce44a1d7d0..3ee852c9925b 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c | |||
@@ -433,11 +433,11 @@ static int __init ibft_check_device(void) | |||
433 | * Helper routiners to check to determine if the entry is valid | 433 | * Helper routiners to check to determine if the entry is valid |
434 | * in the proper iBFT structure. | 434 | * in the proper iBFT structure. |
435 | */ | 435 | */ |
436 | static mode_t ibft_check_nic_for(void *data, int type) | 436 | static umode_t ibft_check_nic_for(void *data, int type) |
437 | { | 437 | { |
438 | struct ibft_kobject *entry = data; | 438 | struct ibft_kobject *entry = data; |
439 | struct ibft_nic *nic = entry->nic; | 439 | struct ibft_nic *nic = entry->nic; |
440 | mode_t rc = 0; | 440 | umode_t rc = 0; |
441 | 441 | ||
442 | switch (type) { | 442 | switch (type) { |
443 | case ISCSI_BOOT_ETH_INDEX: | 443 | case ISCSI_BOOT_ETH_INDEX: |
@@ -488,11 +488,11 @@ static mode_t ibft_check_nic_for(void *data, int type) | |||
488 | return rc; | 488 | return rc; |
489 | } | 489 | } |
490 | 490 | ||
491 | static mode_t __init ibft_check_tgt_for(void *data, int type) | 491 | static umode_t __init ibft_check_tgt_for(void *data, int type) |
492 | { | 492 | { |
493 | struct ibft_kobject *entry = data; | 493 | struct ibft_kobject *entry = data; |
494 | struct ibft_tgt *tgt = entry->tgt; | 494 | struct ibft_tgt *tgt = entry->tgt; |
495 | mode_t rc = 0; | 495 | umode_t rc = 0; |
496 | 496 | ||
497 | switch (type) { | 497 | switch (type) { |
498 | case ISCSI_BOOT_TGT_INDEX: | 498 | case ISCSI_BOOT_TGT_INDEX: |
@@ -524,11 +524,11 @@ static mode_t __init ibft_check_tgt_for(void *data, int type) | |||
524 | return rc; | 524 | return rc; |
525 | } | 525 | } |
526 | 526 | ||
527 | static mode_t __init ibft_check_initiator_for(void *data, int type) | 527 | static umode_t __init ibft_check_initiator_for(void *data, int type) |
528 | { | 528 | { |
529 | struct ibft_kobject *entry = data; | 529 | struct ibft_kobject *entry = data; |
530 | struct ibft_initiator *init = entry->initiator; | 530 | struct ibft_initiator *init = entry->initiator; |
531 | mode_t rc = 0; | 531 | umode_t rc = 0; |
532 | 532 | ||
533 | switch (type) { | 533 | switch (type) { |
534 | case ISCSI_BOOT_INI_INDEX: | 534 | case ISCSI_BOOT_INI_INDEX: |
diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c index 2d3d72805ff4..1a92951f4031 100644 --- a/drivers/hwmon/jc42.c +++ b/drivers/hwmon/jc42.c | |||
@@ -413,7 +413,7 @@ static struct attribute *jc42_attributes[] = { | |||
413 | NULL | 413 | NULL |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static mode_t jc42_attribute_mode(struct kobject *kobj, | 416 | static umode_t jc42_attribute_mode(struct kobject *kobj, |
417 | struct attribute *attr, int index) | 417 | struct attribute *attr, int index) |
418 | { | 418 | { |
419 | struct device *dev = container_of(kobj, struct device, kobj); | 419 | struct device *dev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/hwmon/max1668.c b/drivers/hwmon/max1668.c index 20d1b2ddffb6..6914195cfd35 100644 --- a/drivers/hwmon/max1668.c +++ b/drivers/hwmon/max1668.c | |||
@@ -335,10 +335,10 @@ static struct attribute *max1668_attribute_unique[] = { | |||
335 | NULL | 335 | NULL |
336 | }; | 336 | }; |
337 | 337 | ||
338 | static mode_t max1668_attribute_mode(struct kobject *kobj, | 338 | static umode_t max1668_attribute_mode(struct kobject *kobj, |
339 | struct attribute *attr, int index) | 339 | struct attribute *attr, int index) |
340 | { | 340 | { |
341 | int ret = S_IRUGO; | 341 | umode_t ret = S_IRUGO; |
342 | if (read_only) | 342 | if (read_only) |
343 | return ret; | 343 | return ret; |
344 | if (attr == &sensor_dev_attr_temp1_max.dev_attr.attr || | 344 | if (attr == &sensor_dev_attr_temp1_max.dev_attr.attr || |
diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index ece3aafa54b3..2fc034aeca09 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c | |||
@@ -464,7 +464,7 @@ static SENSOR_DEVICE_ATTR(gpio1_alarm, S_IRUGO, get_alarm, NULL, | |||
464 | static SENSOR_DEVICE_ATTR(gpio2_alarm, S_IRUGO, get_alarm, NULL, | 464 | static SENSOR_DEVICE_ATTR(gpio2_alarm, S_IRUGO, get_alarm, NULL, |
465 | MAX6650_ALRM_GPIO2); | 465 | MAX6650_ALRM_GPIO2); |
466 | 466 | ||
467 | static mode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a, | 467 | static umode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a, |
468 | int n) | 468 | int n) |
469 | { | 469 | { |
470 | struct device *dev = container_of(kobj, struct device, kobj); | 470 | struct device *dev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index 0517a8f09d35..c48381f2cd02 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c | |||
@@ -157,7 +157,7 @@ static ssize_t show_fault(struct device *dev, | |||
157 | return sprintf(buf, "0\n"); | 157 | return sprintf(buf, "0\n"); |
158 | } | 158 | } |
159 | 159 | ||
160 | static mode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a, | 160 | static umode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a, |
161 | int n) | 161 | int n) |
162 | { | 162 | { |
163 | struct device *dev = container_of(kobj, struct device, kobj); | 163 | struct device *dev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 7e7373a700e6..9a43cb07f294 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -638,7 +638,7 @@ iscsi_iser_ep_disconnect(struct iscsi_endpoint *ep) | |||
638 | iser_conn_terminate(ib_conn); | 638 | iser_conn_terminate(ib_conn); |
639 | } | 639 | } |
640 | 640 | ||
641 | static mode_t iser_attr_is_visible(int param_type, int param) | 641 | static umode_t iser_attr_is_visible(int param_type, int param) |
642 | { | 642 | { |
643 | switch (param_type) { | 643 | switch (param_type) { |
644 | case ISCSI_HOST_PARAM: | 644 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 400131df677b..baa43df6502d 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c | |||
@@ -612,10 +612,10 @@ static struct attribute *ad7877_attributes[] = { | |||
612 | NULL | 612 | NULL |
613 | }; | 613 | }; |
614 | 614 | ||
615 | static mode_t ad7877_attr_is_visible(struct kobject *kobj, | 615 | static umode_t ad7877_attr_is_visible(struct kobject *kobj, |
616 | struct attribute *attr, int n) | 616 | struct attribute *attr, int n) |
617 | { | 617 | { |
618 | mode_t mode = attr->mode; | 618 | umode_t mode = attr->mode; |
619 | 619 | ||
620 | if (attr == &dev_attr_aux3.attr) { | 620 | if (attr == &dev_attr_aux3.attr) { |
621 | if (gpio3) | 621 | if (gpio3) |
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index cbf0ff322676..067d95662997 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c | |||
@@ -450,13 +450,13 @@ static struct attribute *tsc2005_attrs[] = { | |||
450 | NULL | 450 | NULL |
451 | }; | 451 | }; |
452 | 452 | ||
453 | static mode_t tsc2005_attr_is_visible(struct kobject *kobj, | 453 | static umode_t tsc2005_attr_is_visible(struct kobject *kobj, |
454 | struct attribute *attr, int n) | 454 | struct attribute *attr, int n) |
455 | { | 455 | { |
456 | struct device *dev = container_of(kobj, struct device, kobj); | 456 | struct device *dev = container_of(kobj, struct device, kobj); |
457 | struct spi_device *spi = to_spi_device(dev); | 457 | struct spi_device *spi = to_spi_device(dev); |
458 | struct tsc2005 *ts = spi_get_drvdata(spi); | 458 | struct tsc2005 *ts = spi_get_drvdata(spi); |
459 | mode_t mode = attr->mode; | 459 | umode_t mode = attr->mode; |
460 | 460 | ||
461 | if (attr == &dev_attr_selftest.attr) { | 461 | if (attr == &dev_attr_selftest.attr) { |
462 | if (!ts->set_reset) | 462 | if (!ts->set_reset) |
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index 81525ae5d869..edaed6f4da6c 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c | |||
@@ -89,7 +89,7 @@ find_smbios_instance_string(struct pci_dev *pdev, char *buf, | |||
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | 91 | ||
92 | static mode_t | 92 | static umode_t |
93 | smbios_instance_string_exist(struct kobject *kobj, struct attribute *attr, | 93 | smbios_instance_string_exist(struct kobject *kobj, struct attribute *attr, |
94 | int n) | 94 | int n) |
95 | { | 95 | { |
@@ -275,7 +275,7 @@ device_has_dsm(struct device *dev) | |||
275 | return FALSE; | 275 | return FALSE; |
276 | } | 276 | } |
277 | 277 | ||
278 | static mode_t | 278 | static umode_t |
279 | acpi_index_string_exist(struct kobject *kobj, struct attribute *attr, int n) | 279 | acpi_index_string_exist(struct kobject *kobj, struct attribute *attr, int n) |
280 | { | 280 | { |
281 | struct device *dev; | 281 | struct device *dev; |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index edaccad9b5bf..b7944f903886 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -1477,7 +1477,7 @@ static struct attribute *asus_attributes[] = { | |||
1477 | NULL | 1477 | NULL |
1478 | }; | 1478 | }; |
1479 | 1479 | ||
1480 | static mode_t asus_sysfs_is_visible(struct kobject *kobj, | 1480 | static umode_t asus_sysfs_is_visible(struct kobject *kobj, |
1481 | struct attribute *attr, | 1481 | struct attribute *attr, |
1482 | int idx) | 1482 | int idx) |
1483 | { | 1483 | { |
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index d1049ee3c9e8..72d731c21d45 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c | |||
@@ -992,7 +992,7 @@ static struct attribute *hwmon_attributes[] = { | |||
992 | NULL | 992 | NULL |
993 | }; | 993 | }; |
994 | 994 | ||
995 | static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj, | 995 | static umode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj, |
996 | struct attribute *attr, int idx) | 996 | struct attribute *attr, int idx) |
997 | { | 997 | { |
998 | struct device *dev = container_of(kobj, struct device, kobj); | 998 | struct device *dev = container_of(kobj, struct device, kobj); |
@@ -1357,7 +1357,7 @@ static struct attribute *platform_attributes[] = { | |||
1357 | NULL | 1357 | NULL |
1358 | }; | 1358 | }; |
1359 | 1359 | ||
1360 | static mode_t asus_sysfs_is_visible(struct kobject *kobj, | 1360 | static umode_t asus_sysfs_is_visible(struct kobject *kobj, |
1361 | struct attribute *attr, int idx) | 1361 | struct attribute *attr, int idx) |
1362 | { | 1362 | { |
1363 | struct device *dev = container_of(kobj, struct device, kobj); | 1363 | struct device *dev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index a36addf106a0..ac902f7a9baa 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c | |||
@@ -368,7 +368,7 @@ static struct attribute *ideapad_attributes[] = { | |||
368 | NULL | 368 | NULL |
369 | }; | 369 | }; |
370 | 370 | ||
371 | static mode_t ideapad_is_visible(struct kobject *kobj, | 371 | static umode_t ideapad_is_visible(struct kobject *kobj, |
372 | struct attribute *attr, | 372 | struct attribute *attr, |
373 | int idx) | 373 | int idx) |
374 | { | 374 | { |
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index e15d4c9d3988..e95cd657dac2 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c | |||
@@ -176,13 +176,13 @@ static struct device_attribute power_supply_attrs[] = { | |||
176 | static struct attribute * | 176 | static struct attribute * |
177 | __power_supply_attrs[ARRAY_SIZE(power_supply_attrs) + 1]; | 177 | __power_supply_attrs[ARRAY_SIZE(power_supply_attrs) + 1]; |
178 | 178 | ||
179 | static mode_t power_supply_attr_is_visible(struct kobject *kobj, | 179 | static umode_t power_supply_attr_is_visible(struct kobject *kobj, |
180 | struct attribute *attr, | 180 | struct attribute *attr, |
181 | int attrno) | 181 | int attrno) |
182 | { | 182 | { |
183 | struct device *dev = container_of(kobj, struct device, kobj); | 183 | struct device *dev = container_of(kobj, struct device, kobj); |
184 | struct power_supply *psy = dev_get_drvdata(dev); | 184 | struct power_supply *psy = dev_get_drvdata(dev); |
185 | mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; | 185 | umode_t mode = S_IRUSR | S_IRGRP | S_IROTH; |
186 | int i; | 186 | int i; |
187 | 187 | ||
188 | if (attrno == POWER_SUPPLY_PROP_TYPE) | 188 | if (attrno == POWER_SUPPLY_PROP_TYPE) |
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 8b002f6db6ca..33c8f09c7ac1 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c | |||
@@ -733,7 +733,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep) | |||
733 | iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep); | 733 | iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep); |
734 | } | 734 | } |
735 | 735 | ||
736 | mode_t be2iscsi_attr_is_visible(int param_type, int param) | 736 | umode_t be2iscsi_attr_is_visible(int param_type, int param) |
737 | { | 737 | { |
738 | switch (param_type) { | 738 | switch (param_type) { |
739 | case ISCSI_HOST_PARAM: | 739 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/be2iscsi/be_iscsi.h b/drivers/scsi/be2iscsi/be_iscsi.h index 4a1f2e393f31..5c45be134501 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.h +++ b/drivers/scsi/be2iscsi/be_iscsi.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define BE2_IPV4 0x1 | 26 | #define BE2_IPV4 0x1 |
27 | #define BE2_IPV6 0x10 | 27 | #define BE2_IPV6 0x10 |
28 | 28 | ||
29 | mode_t be2iscsi_attr_is_visible(int param_type, int param); | 29 | umode_t be2iscsi_attr_is_visible(int param_type, int param); |
30 | 30 | ||
31 | void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn, | 31 | void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn, |
32 | struct beiscsi_offload_params *params); | 32 | struct beiscsi_offload_params *params); |
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 379c696dac19..797a43994b55 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -325,9 +325,9 @@ static ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type) | 328 | static umode_t beiscsi_tgt_get_attr_visibility(void *data, int type) |
329 | { | 329 | { |
330 | int rc; | 330 | umode_t rc; |
331 | 331 | ||
332 | switch (type) { | 332 | switch (type) { |
333 | case ISCSI_BOOT_TGT_NAME: | 333 | case ISCSI_BOOT_TGT_NAME: |
@@ -348,9 +348,9 @@ static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type) | |||
348 | return rc; | 348 | return rc; |
349 | } | 349 | } |
350 | 350 | ||
351 | static mode_t beiscsi_ini_get_attr_visibility(void *data, int type) | 351 | static umode_t beiscsi_ini_get_attr_visibility(void *data, int type) |
352 | { | 352 | { |
353 | int rc; | 353 | umode_t rc; |
354 | 354 | ||
355 | switch (type) { | 355 | switch (type) { |
356 | case ISCSI_BOOT_INI_INITIATOR_NAME: | 356 | case ISCSI_BOOT_INI_INITIATOR_NAME: |
@@ -364,9 +364,9 @@ static mode_t beiscsi_ini_get_attr_visibility(void *data, int type) | |||
364 | } | 364 | } |
365 | 365 | ||
366 | 366 | ||
367 | static mode_t beiscsi_eth_get_attr_visibility(void *data, int type) | 367 | static umode_t beiscsi_eth_get_attr_visibility(void *data, int type) |
368 | { | 368 | { |
369 | int rc; | 369 | umode_t rc; |
370 | 370 | ||
371 | switch (type) { | 371 | switch (type) { |
372 | case ISCSI_BOOT_ETH_FLAGS: | 372 | case ISCSI_BOOT_ETH_FLAGS: |
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index d1e697190970..1a44b45e7bef 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c | |||
@@ -2177,7 +2177,7 @@ static int bnx2i_nl_set_path(struct Scsi_Host *shost, struct iscsi_path *params) | |||
2177 | return 0; | 2177 | return 0; |
2178 | } | 2178 | } |
2179 | 2179 | ||
2180 | static mode_t bnx2i_attr_is_visible(int param_type, int param) | 2180 | static umode_t bnx2i_attr_is_visible(int param_type, int param) |
2181 | { | 2181 | { |
2182 | switch (param_type) { | 2182 | switch (param_type) { |
2183 | case ISCSI_HOST_PARAM: | 2183 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index c10f74a566f2..997fa36999be 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c | |||
@@ -2569,7 +2569,7 @@ void cxgbi_iscsi_cleanup(struct iscsi_transport *itp, | |||
2569 | } | 2569 | } |
2570 | EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup); | 2570 | EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup); |
2571 | 2571 | ||
2572 | mode_t cxgbi_attr_is_visible(int param_type, int param) | 2572 | umode_t cxgbi_attr_is_visible(int param_type, int param) |
2573 | { | 2573 | { |
2574 | switch (param_type) { | 2574 | switch (param_type) { |
2575 | case ISCSI_HOST_PARAM: | 2575 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h index 20c88279c7a6..80fa99b3d384 100644 --- a/drivers/scsi/cxgbi/libcxgbi.h +++ b/drivers/scsi/cxgbi/libcxgbi.h | |||
@@ -709,7 +709,7 @@ int cxgbi_conn_xmit_pdu(struct iscsi_task *); | |||
709 | 709 | ||
710 | void cxgbi_cleanup_task(struct iscsi_task *task); | 710 | void cxgbi_cleanup_task(struct iscsi_task *task); |
711 | 711 | ||
712 | mode_t cxgbi_attr_is_visible(int param_type, int param); | 712 | umode_t cxgbi_attr_is_visible(int param_type, int param); |
713 | void cxgbi_get_conn_stats(struct iscsi_cls_conn *, struct iscsi_stats *); | 713 | void cxgbi_get_conn_stats(struct iscsi_cls_conn *, struct iscsi_stats *); |
714 | int cxgbi_set_conn_param(struct iscsi_cls_conn *, | 714 | int cxgbi_set_conn_param(struct iscsi_cls_conn *, |
715 | enum iscsi_param, char *, int); | 715 | enum iscsi_param, char *, int); |
diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c index 89700cbca16e..14c1c8f6a95e 100644 --- a/drivers/scsi/iscsi_boot_sysfs.c +++ b/drivers/scsi/iscsi_boot_sysfs.c | |||
@@ -112,7 +112,7 @@ static struct attribute *target_attrs[] = { | |||
112 | NULL | 112 | NULL |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static mode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, | 115 | static umode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, |
116 | struct attribute *attr, int i) | 116 | struct attribute *attr, int i) |
117 | { | 117 | { |
118 | struct iscsi_boot_kobj *boot_kobj = | 118 | struct iscsi_boot_kobj *boot_kobj = |
@@ -193,7 +193,7 @@ static struct attribute *ethernet_attrs[] = { | |||
193 | NULL | 193 | NULL |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static mode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, | 196 | static umode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, |
197 | struct attribute *attr, int i) | 197 | struct attribute *attr, int i) |
198 | { | 198 | { |
199 | struct iscsi_boot_kobj *boot_kobj = | 199 | struct iscsi_boot_kobj *boot_kobj = |
@@ -265,7 +265,7 @@ static struct attribute *initiator_attrs[] = { | |||
265 | NULL | 265 | NULL |
266 | }; | 266 | }; |
267 | 267 | ||
268 | static mode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, | 268 | static umode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, |
269 | struct attribute *attr, int i) | 269 | struct attribute *attr, int i) |
270 | { | 270 | { |
271 | struct iscsi_boot_kobj *boot_kobj = | 271 | struct iscsi_boot_kobj *boot_kobj = |
@@ -306,7 +306,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset, | |||
306 | struct attribute_group *attr_group, | 306 | struct attribute_group *attr_group, |
307 | const char *name, int index, void *data, | 307 | const char *name, int index, void *data, |
308 | ssize_t (*show) (void *data, int type, char *buf), | 308 | ssize_t (*show) (void *data, int type, char *buf), |
309 | mode_t (*is_visible) (void *data, int type), | 309 | umode_t (*is_visible) (void *data, int type), |
310 | void (*release) (void *data)) | 310 | void (*release) (void *data)) |
311 | { | 311 | { |
312 | struct iscsi_boot_kobj *boot_kobj; | 312 | struct iscsi_boot_kobj *boot_kobj; |
@@ -369,7 +369,7 @@ struct iscsi_boot_kobj * | |||
369 | iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, | 369 | iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index, |
370 | void *data, | 370 | void *data, |
371 | ssize_t (*show) (void *data, int type, char *buf), | 371 | ssize_t (*show) (void *data, int type, char *buf), |
372 | mode_t (*is_visible) (void *data, int type), | 372 | umode_t (*is_visible) (void *data, int type), |
373 | void (*release) (void *data)) | 373 | void (*release) (void *data)) |
374 | { | 374 | { |
375 | return iscsi_boot_create_kobj(boot_kset, &iscsi_boot_target_attr_group, | 375 | return iscsi_boot_create_kobj(boot_kset, &iscsi_boot_target_attr_group, |
@@ -394,7 +394,7 @@ struct iscsi_boot_kobj * | |||
394 | iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, | 394 | iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index, |
395 | void *data, | 395 | void *data, |
396 | ssize_t (*show) (void *data, int type, char *buf), | 396 | ssize_t (*show) (void *data, int type, char *buf), |
397 | mode_t (*is_visible) (void *data, int type), | 397 | umode_t (*is_visible) (void *data, int type), |
398 | void (*release) (void *data)) | 398 | void (*release) (void *data)) |
399 | { | 399 | { |
400 | return iscsi_boot_create_kobj(boot_kset, | 400 | return iscsi_boot_create_kobj(boot_kset, |
@@ -420,7 +420,7 @@ struct iscsi_boot_kobj * | |||
420 | iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, | 420 | iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index, |
421 | void *data, | 421 | void *data, |
422 | ssize_t (*show) (void *data, int type, char *buf), | 422 | ssize_t (*show) (void *data, int type, char *buf), |
423 | mode_t (*is_visible) (void *data, int type), | 423 | umode_t (*is_visible) (void *data, int type), |
424 | void (*release) (void *data)) | 424 | void (*release) (void *data)) |
425 | { | 425 | { |
426 | return iscsi_boot_create_kobj(boot_kset, | 426 | return iscsi_boot_create_kobj(boot_kset, |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 7c34d8e7cc75..db47158e0dde 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -873,7 +873,7 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session) | |||
873 | iscsi_host_free(shost); | 873 | iscsi_host_free(shost); |
874 | } | 874 | } |
875 | 875 | ||
876 | static mode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) | 876 | static umode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) |
877 | { | 877 | { |
878 | switch (param_type) { | 878 | switch (param_type) { |
879 | case ISCSI_HOST_PARAM: | 879 | case ISCSI_HOST_PARAM: |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 4169c8baa112..78bf700b365f 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -128,7 +128,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd); | |||
128 | static int qla4xxx_slave_alloc(struct scsi_device *device); | 128 | static int qla4xxx_slave_alloc(struct scsi_device *device); |
129 | static int qla4xxx_slave_configure(struct scsi_device *device); | 129 | static int qla4xxx_slave_configure(struct scsi_device *device); |
130 | static void qla4xxx_slave_destroy(struct scsi_device *sdev); | 130 | static void qla4xxx_slave_destroy(struct scsi_device *sdev); |
131 | static mode_t ql4_attr_is_visible(int param_type, int param); | 131 | static umode_t ql4_attr_is_visible(int param_type, int param); |
132 | static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); | 132 | static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); |
133 | 133 | ||
134 | static struct qla4_8xxx_legacy_intr_set legacy_intr[] = | 134 | static struct qla4_8xxx_legacy_intr_set legacy_intr[] = |
@@ -197,7 +197,7 @@ static struct iscsi_transport qla4xxx_iscsi_transport = { | |||
197 | 197 | ||
198 | static struct scsi_transport_template *qla4xxx_scsi_transport; | 198 | static struct scsi_transport_template *qla4xxx_scsi_transport; |
199 | 199 | ||
200 | static mode_t ql4_attr_is_visible(int param_type, int param) | 200 | static umode_t ql4_attr_is_visible(int param_type, int param) |
201 | { | 201 | { |
202 | switch (param_type) { | 202 | switch (param_type) { |
203 | case ISCSI_HOST_PARAM: | 203 | case ISCSI_HOST_PARAM: |
@@ -3039,7 +3039,7 @@ static ssize_t qla4xxx_show_boot_eth_info(void *data, int type, char *buf) | |||
3039 | return rc; | 3039 | return rc; |
3040 | } | 3040 | } |
3041 | 3041 | ||
3042 | static mode_t qla4xxx_eth_get_attr_visibility(void *data, int type) | 3042 | static umode_t qla4xxx_eth_get_attr_visibility(void *data, int type) |
3043 | { | 3043 | { |
3044 | int rc; | 3044 | int rc; |
3045 | 3045 | ||
@@ -3073,7 +3073,7 @@ static ssize_t qla4xxx_show_boot_ini_info(void *data, int type, char *buf) | |||
3073 | return rc; | 3073 | return rc; |
3074 | } | 3074 | } |
3075 | 3075 | ||
3076 | static mode_t qla4xxx_ini_get_attr_visibility(void *data, int type) | 3076 | static umode_t qla4xxx_ini_get_attr_visibility(void *data, int type) |
3077 | { | 3077 | { |
3078 | int rc; | 3078 | int rc; |
3079 | 3079 | ||
@@ -3160,7 +3160,7 @@ static ssize_t qla4xxx_show_boot_tgt_sec_info(void *data, int type, char *buf) | |||
3160 | return qla4xxx_show_boot_tgt_info(boot_sess, type, buf); | 3160 | return qla4xxx_show_boot_tgt_info(boot_sess, type, buf); |
3161 | } | 3161 | } |
3162 | 3162 | ||
3163 | static mode_t qla4xxx_tgt_get_attr_visibility(void *data, int type) | 3163 | static umode_t qla4xxx_tgt_get_attr_visibility(void *data, int type) |
3164 | { | 3164 | { |
3165 | int rc; | 3165 | int rc; |
3166 | 3166 | ||
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 96029e6d027f..e8447fbc31f3 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -328,7 +328,7 @@ iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED); | |||
328 | iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); | 328 | iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); |
329 | iscsi_iface_net_attr(iface, port, ISCSI_NET_PARAM_PORT); | 329 | iscsi_iface_net_attr(iface, port, ISCSI_NET_PARAM_PORT); |
330 | 330 | ||
331 | static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, | 331 | static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj, |
332 | struct attribute *attr, int i) | 332 | struct attribute *attr, int i) |
333 | { | 333 | { |
334 | struct device *dev = container_of(kobj, struct device, kobj); | 334 | struct device *dev = container_of(kobj, struct device, kobj); |
@@ -2199,7 +2199,7 @@ static struct attribute *iscsi_conn_attrs[] = { | |||
2199 | NULL, | 2199 | NULL, |
2200 | }; | 2200 | }; |
2201 | 2201 | ||
2202 | static mode_t iscsi_conn_attr_is_visible(struct kobject *kobj, | 2202 | static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, |
2203 | struct attribute *attr, int i) | 2203 | struct attribute *attr, int i) |
2204 | { | 2204 | { |
2205 | struct device *cdev = container_of(kobj, struct device, kobj); | 2205 | struct device *cdev = container_of(kobj, struct device, kobj); |
@@ -2370,7 +2370,7 @@ static struct attribute *iscsi_session_attrs[] = { | |||
2370 | NULL, | 2370 | NULL, |
2371 | }; | 2371 | }; |
2372 | 2372 | ||
2373 | static mode_t iscsi_session_attr_is_visible(struct kobject *kobj, | 2373 | static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, |
2374 | struct attribute *attr, int i) | 2374 | struct attribute *attr, int i) |
2375 | { | 2375 | { |
2376 | struct device *cdev = container_of(kobj, struct device, kobj); | 2376 | struct device *cdev = container_of(kobj, struct device, kobj); |
@@ -2468,7 +2468,7 @@ static struct attribute *iscsi_host_attrs[] = { | |||
2468 | NULL, | 2468 | NULL, |
2469 | }; | 2469 | }; |
2470 | 2470 | ||
2471 | static mode_t iscsi_host_attr_is_visible(struct kobject *kobj, | 2471 | static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, |
2472 | struct attribute *attr, int i) | 2472 | struct attribute *attr, int i) |
2473 | { | 2473 | { |
2474 | struct device *cdev = container_of(kobj, struct device, kobj); | 2474 | struct device *cdev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 5fbeadd96819..a2715c31e754 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -1434,7 +1434,7 @@ static int spi_host_configure(struct transport_container *tc, | |||
1434 | (si->f->show_##name ? S_IRUGO : 0) | \ | 1434 | (si->f->show_##name ? S_IRUGO : 0) | \ |
1435 | (si->f->set_##name ? S_IWUSR : 0) | 1435 | (si->f->set_##name ? S_IWUSR : 0) |
1436 | 1436 | ||
1437 | static mode_t target_attribute_is_visible(struct kobject *kobj, | 1437 | static umode_t target_attribute_is_visible(struct kobject *kobj, |
1438 | struct attribute *attr, int i) | 1438 | struct attribute *attr, int i) |
1439 | { | 1439 | { |
1440 | struct device *cdev = container_of(kobj, struct device, kobj); | 1440 | struct device *cdev = container_of(kobj, struct device, kobj); |
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 31c376b9d5eb..e7bf32461736 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c | |||
@@ -838,14 +838,14 @@ static struct attribute *ad7192_attributes[] = { | |||
838 | NULL | 838 | NULL |
839 | }; | 839 | }; |
840 | 840 | ||
841 | static mode_t ad7192_attr_is_visible(struct kobject *kobj, | 841 | static umode_t ad7192_attr_is_visible(struct kobject *kobj, |
842 | struct attribute *attr, int n) | 842 | struct attribute *attr, int n) |
843 | { | 843 | { |
844 | struct device *dev = container_of(kobj, struct device, kobj); | 844 | struct device *dev = container_of(kobj, struct device, kobj); |
845 | struct iio_dev *indio_dev = dev_get_drvdata(dev); | 845 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
846 | struct ad7192_state *st = iio_priv(indio_dev); | 846 | struct ad7192_state *st = iio_priv(indio_dev); |
847 | 847 | ||
848 | mode_t mode = attr->mode; | 848 | umode_t mode = attr->mode; |
849 | 849 | ||
850 | if ((st->devid != ID_AD7195) && | 850 | if ((st->devid != ID_AD7195) && |
851 | (attr == &iio_dev_attr_ac_excitation_en.dev_attr.attr)) | 851 | (attr == &iio_dev_attr_ac_excitation_en.dev_attr.attr)) |
diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c index 54423ab196fe..e3ecd3d2ef3a 100644 --- a/drivers/staging/iio/adc/ad7606_core.c +++ b/drivers/staging/iio/adc/ad7606_core.c | |||
@@ -205,14 +205,14 @@ static struct attribute *ad7606_attributes[] = { | |||
205 | NULL, | 205 | NULL, |
206 | }; | 206 | }; |
207 | 207 | ||
208 | static mode_t ad7606_attr_is_visible(struct kobject *kobj, | 208 | static umode_t ad7606_attr_is_visible(struct kobject *kobj, |
209 | struct attribute *attr, int n) | 209 | struct attribute *attr, int n) |
210 | { | 210 | { |
211 | struct device *dev = container_of(kobj, struct device, kobj); | 211 | struct device *dev = container_of(kobj, struct device, kobj); |
212 | struct iio_dev *indio_dev = dev_get_drvdata(dev); | 212 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
213 | struct ad7606_state *st = iio_priv(indio_dev); | 213 | struct ad7606_state *st = iio_priv(indio_dev); |
214 | 214 | ||
215 | mode_t mode = attr->mode; | 215 | umode_t mode = attr->mode; |
216 | 216 | ||
217 | if (!(gpio_is_valid(st->pdata->gpio_os0) && | 217 | if (!(gpio_is_valid(st->pdata->gpio_os0) && |
218 | gpio_is_valid(st->pdata->gpio_os1) && | 218 | gpio_is_valid(st->pdata->gpio_os1) && |
diff --git a/drivers/staging/iio/dac/ad5446.c b/drivers/staging/iio/dac/ad5446.c index e1c204d51d8c..dc46b6d6eaa3 100644 --- a/drivers/staging/iio/dac/ad5446.c +++ b/drivers/staging/iio/dac/ad5446.c | |||
@@ -197,14 +197,14 @@ static struct attribute *ad5446_attributes[] = { | |||
197 | NULL, | 197 | NULL, |
198 | }; | 198 | }; |
199 | 199 | ||
200 | static mode_t ad5446_attr_is_visible(struct kobject *kobj, | 200 | static umode_t ad5446_attr_is_visible(struct kobject *kobj, |
201 | struct attribute *attr, int n) | 201 | struct attribute *attr, int n) |
202 | { | 202 | { |
203 | struct device *dev = container_of(kobj, struct device, kobj); | 203 | struct device *dev = container_of(kobj, struct device, kobj); |
204 | struct iio_dev *indio_dev = dev_get_drvdata(dev); | 204 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
205 | struct ad5446_state *st = iio_priv(indio_dev); | 205 | struct ad5446_state *st = iio_priv(indio_dev); |
206 | 206 | ||
207 | mode_t mode = attr->mode; | 207 | umode_t mode = attr->mode; |
208 | 208 | ||
209 | if (!st->chip_info->store_pwr_down && | 209 | if (!st->chip_info->store_pwr_down && |
210 | (attr == &iio_dev_attr_out_voltage0_powerdown.dev_attr.attr || | 210 | (attr == &iio_dev_attr_out_voltage0_powerdown.dev_attr.attr || |
diff --git a/drivers/staging/iio/dds/ad9834.c b/drivers/staging/iio/dds/ad9834.c index c468f696fe25..cc3293a9f496 100644 --- a/drivers/staging/iio/dds/ad9834.c +++ b/drivers/staging/iio/dds/ad9834.c | |||
@@ -281,14 +281,14 @@ static struct attribute *ad9834_attributes[] = { | |||
281 | NULL, | 281 | NULL, |
282 | }; | 282 | }; |
283 | 283 | ||
284 | static mode_t ad9834_attr_is_visible(struct kobject *kobj, | 284 | static umode_t ad9834_attr_is_visible(struct kobject *kobj, |
285 | struct attribute *attr, int n) | 285 | struct attribute *attr, int n) |
286 | { | 286 | { |
287 | struct device *dev = container_of(kobj, struct device, kobj); | 287 | struct device *dev = container_of(kobj, struct device, kobj); |
288 | struct iio_dev *indio_dev = dev_get_drvdata(dev); | 288 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
289 | struct ad9834_state *st = iio_priv(indio_dev); | 289 | struct ad9834_state *st = iio_priv(indio_dev); |
290 | 290 | ||
291 | mode_t mode = attr->mode; | 291 | umode_t mode = attr->mode; |
292 | 292 | ||
293 | if (((st->devid == ID_AD9833) || (st->devid == ID_AD9837)) && | 293 | if (((st->devid == ID_AD9833) || (st->devid == ID_AD9837)) && |
294 | ((attr == &iio_dev_attr_dds0_out1_enable.dev_attr.attr) || | 294 | ((attr == &iio_dev_attr_dds0_out1_enable.dev_attr.attr) || |
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index 662c0cf3a3e1..9e491ca2e5c4 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -642,7 +642,7 @@ static struct attribute *dev_string_attrs[] = { | |||
642 | NULL | 642 | NULL |
643 | }; | 643 | }; |
644 | 644 | ||
645 | static mode_t dev_string_attrs_are_visible(struct kobject *kobj, | 645 | static umode_t dev_string_attrs_are_visible(struct kobject *kobj, |
646 | struct attribute *a, int n) | 646 | struct attribute *a, int n) |
647 | { | 647 | { |
648 | struct device *dev = container_of(kobj, struct device, kobj); | 648 | struct device *dev = container_of(kobj, struct device, kobj); |
@@ -877,7 +877,7 @@ static struct attribute *intf_assoc_attrs[] = { | |||
877 | NULL, | 877 | NULL, |
878 | }; | 878 | }; |
879 | 879 | ||
880 | static mode_t intf_assoc_attrs_are_visible(struct kobject *kobj, | 880 | static umode_t intf_assoc_attrs_are_visible(struct kobject *kobj, |
881 | struct attribute *a, int n) | 881 | struct attribute *a, int n) |
882 | { | 882 | { |
883 | struct device *dev = container_of(kobj, struct device, kobj); | 883 | struct device *dev = container_of(kobj, struct device, kobj); |