Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sound: Use octal not symbolic permissions

Convert the S_<FOO> symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.

see: https://lkml.org/lkml/2016/8/2/1945

Done with automated conversion via:
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...>

Miscellanea:

o Wrapped one multi-line call to a single line

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Joe Perches and committed by
Takashi Iwai
6a73cf46 84eaaef2

+102 -103
+1 -1
sound/core/compress_offload.c
··· 1001 1001 compr->card->proc_root); 1002 1002 if (!entry) 1003 1003 return -ENOMEM; 1004 - entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; 1004 + entry->mode = S_IFDIR | 0555; 1005 1005 if (snd_info_register(entry) < 0) { 1006 1006 snd_info_free_entry(entry); 1007 1007 return -ENOMEM;
+3 -3
sound/core/info.c
··· 454 454 entry = snd_info_create_module_entry(mod, name, NULL); 455 455 if (!entry) 456 456 return NULL; 457 - entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; 457 + entry->mode = S_IFDIR | 0555; 458 458 if (snd_info_register(entry) < 0) { 459 459 snd_info_free_entry(entry); 460 460 return NULL; ··· 470 470 snd_proc_root = snd_info_create_entry("asound", NULL); 471 471 if (!snd_proc_root) 472 472 return -ENOMEM; 473 - snd_proc_root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 473 + snd_proc_root->mode = S_IFDIR | 0555; 474 474 snd_proc_root->p = proc_mkdir("asound", NULL); 475 475 if (!snd_proc_root->p) 476 476 goto error; ··· 716 716 kfree(entry); 717 717 return NULL; 718 718 } 719 - entry->mode = S_IFREG | S_IRUGO; 719 + entry->mode = S_IFREG | 0444; 720 720 entry->content = SNDRV_INFO_CONTENT_TEXT; 721 721 mutex_init(&entry->access); 722 722 INIT_LIST_HEAD(&entry->children);
+2 -2
sound/core/init.c
··· 703 703 return count; 704 704 } 705 705 706 - static DEVICE_ATTR(id, S_IRUGO | S_IWUSR, card_id_show_attr, card_id_store_attr); 706 + static DEVICE_ATTR(id, 0644, card_id_show_attr, card_id_store_attr); 707 707 708 708 static ssize_t 709 709 card_number_show_attr(struct device *dev, ··· 713 713 return scnprintf(buf, PAGE_SIZE, "%i\n", card->number); 714 714 } 715 715 716 - static DEVICE_ATTR(number, S_IRUGO, card_number_show_attr, NULL); 716 + static DEVICE_ATTR(number, 0444, card_number_show_attr, NULL); 717 717 718 718 static struct attribute *card_dev_attrs[] = { 719 719 &dev_attr_id.attr,
+1 -1
sound/core/oss/mixer_oss.c
··· 1247 1247 if (! entry) 1248 1248 return; 1249 1249 entry->content = SNDRV_INFO_CONTENT_TEXT; 1250 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 1250 + entry->mode = S_IFREG | 0644; 1251 1251 entry->c.text.read = snd_mixer_oss_proc_read; 1252 1252 entry->c.text.write = snd_mixer_oss_proc_write; 1253 1253 entry->private_data = mixer;
+1 -1
sound/core/oss/pcm_oss.c
··· 3045 3045 continue; 3046 3046 if ((entry = snd_info_create_card_entry(pcm->card, "oss", pstr->proc_root)) != NULL) { 3047 3047 entry->content = SNDRV_INFO_CONTENT_TEXT; 3048 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 3048 + entry->mode = S_IFREG | 0644; 3049 3049 entry->c.text.read = snd_pcm_oss_proc_read; 3050 3050 entry->c.text.write = snd_pcm_oss_proc_write; 3051 3051 entry->private_data = pstr;
+5 -5
sound/core/pcm.c
··· 530 530 pcm->card->proc_root); 531 531 if (!entry) 532 532 return -ENOMEM; 533 - entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; 533 + entry->mode = S_IFDIR | 0555; 534 534 if (snd_info_register(entry) < 0) { 535 535 snd_info_free_entry(entry); 536 536 return -ENOMEM; ··· 552 552 if (entry) { 553 553 entry->c.text.read = snd_pcm_xrun_debug_read; 554 554 entry->c.text.write = snd_pcm_xrun_debug_write; 555 - entry->mode |= S_IWUSR; 555 + entry->mode |= 0200; 556 556 entry->private_data = pstr; 557 557 if (snd_info_register(entry) < 0) { 558 558 snd_info_free_entry(entry); ··· 590 590 substream->pstr->proc_root); 591 591 if (!entry) 592 592 return -ENOMEM; 593 - entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; 593 + entry->mode = S_IFDIR | 0555; 594 594 if (snd_info_register(entry) < 0) { 595 595 snd_info_free_entry(entry); 596 596 return -ENOMEM; ··· 647 647 entry->private_data = substream; 648 648 entry->c.text.read = NULL; 649 649 entry->c.text.write = snd_pcm_xrun_injection_write; 650 - entry->mode = S_IFREG | S_IWUSR; 650 + entry->mode = S_IFREG | 0200; 651 651 if (snd_info_register(entry) < 0) { 652 652 snd_info_free_entry(entry); 653 653 entry = NULL; ··· 1087 1087 return snprintf(buf, PAGE_SIZE, "%s\n", str); 1088 1088 } 1089 1089 1090 - static DEVICE_ATTR(pcm_class, S_IRUGO, show_pcm_class, NULL); 1090 + static DEVICE_ATTR(pcm_class, 0444, show_pcm_class, NULL); 1091 1091 static struct attribute *pcm_dev_attrs[] = { 1092 1092 &dev_attr_pcm_class.attr, 1093 1093 NULL
+1 -1
sound/core/pcm_memory.c
··· 201 201 if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) { 202 202 entry->c.text.read = snd_pcm_lib_preallocate_proc_read; 203 203 entry->c.text.write = snd_pcm_lib_preallocate_proc_write; 204 - entry->mode |= S_IWUSR; 204 + entry->mode |= 0200; 205 205 entry->private_data = substream; 206 206 if (snd_info_register(entry) < 0) { 207 207 snd_info_free_entry(entry);
+1 -1
sound/drivers/dummy.c
··· 1042 1042 if (!snd_card_proc_new(chip->card, "dummy_pcm", &entry)) { 1043 1043 snd_info_set_text_ops(entry, chip, dummy_proc_read); 1044 1044 entry->c.text.write = dummy_proc_write; 1045 - entry->mode |= S_IWUSR; 1045 + entry->mode |= 0200; 1046 1046 entry->private_data = chip; 1047 1047 } 1048 1048 }
+3 -3
sound/drivers/mts64.c
··· 41 41 static struct platform_device *platform_devices[SNDRV_CARDS]; 42 42 static int device_count; 43 43 44 - module_param_array(index, int, NULL, S_IRUGO); 44 + module_param_array(index, int, NULL, 0444); 45 45 MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); 46 - module_param_array(id, charp, NULL, S_IRUGO); 46 + module_param_array(id, charp, NULL, 0444); 47 47 MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); 48 - module_param_array(enable, bool, NULL, S_IRUGO); 48 + module_param_array(enable, bool, NULL, 0444); 49 49 MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); 50 50 51 51 MODULE_AUTHOR("Matthias Koenig <mk@phasorlab.de>");
+1 -1
sound/drivers/opl4/opl4_proc.c
··· 104 104 if (entry) { 105 105 if (opl4->hardware < OPL3_HW_OPL4_ML) { 106 106 /* OPL4 can access 4 MB external ROM/SRAM */ 107 - entry->mode |= S_IWUSR; 107 + entry->mode |= 0200; 108 108 entry->size = 4 * 1024 * 1024; 109 109 } else { 110 110 /* OPL4-ML has 1 MB internal ROM */
+3 -3
sound/drivers/portman2x4.c
··· 60 60 static struct platform_device *platform_devices[SNDRV_CARDS]; 61 61 static int device_count; 62 62 63 - module_param_array(index, int, NULL, S_IRUGO); 63 + module_param_array(index, int, NULL, 0444); 64 64 MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); 65 - module_param_array(id, charp, NULL, S_IRUGO); 65 + module_param_array(id, charp, NULL, 0444); 66 66 MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); 67 - module_param_array(enable, bool, NULL, S_IRUGO); 67 + module_param_array(enable, bool, NULL, 0444); 68 68 MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); 69 69 70 70 MODULE_AUTHOR("Levent Guendogdu, Tobias Gehrig, Matthias Koenig");
+1 -1
sound/firewire/bebob/bebob_proc.c
··· 183 183 bebob->card->proc_root); 184 184 if (root == NULL) 185 185 return; 186 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 186 + root->mode = S_IFDIR | 0555; 187 187 if (snd_info_register(root) < 0) { 188 188 snd_info_free_entry(root); 189 189 return;
+1 -1
sound/firewire/dice/dice-proc.c
··· 305 305 dice->card->proc_root); 306 306 if (!root) 307 307 return; 308 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 308 + root->mode = S_IFDIR | 0555; 309 309 if (snd_info_register(root) < 0) { 310 310 snd_info_free_entry(root); 311 311 return;
+1 -1
sound/firewire/digi00x/digi00x-proc.c
··· 79 79 if (root == NULL) 80 80 return; 81 81 82 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 82 + root->mode = S_IFDIR | 0555; 83 83 if (snd_info_register(root) < 0) { 84 84 snd_info_free_entry(root); 85 85 return;
+1 -1
sound/firewire/fireface/ff-proc.c
··· 52 52 ff->card->proc_root); 53 53 if (root == NULL) 54 54 return; 55 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 55 + root->mode = S_IFDIR | 0555; 56 56 if (snd_info_register(root) < 0) { 57 57 snd_info_free_entry(root); 58 58 return;
+1 -1
sound/firewire/fireworks/fireworks_proc.c
··· 219 219 efw->card->proc_root); 220 220 if (root == NULL) 221 221 return; 222 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 222 + root->mode = S_IFDIR | 0555; 223 223 if (snd_info_register(root) < 0) { 224 224 snd_info_free_entry(root); 225 225 return;
+1 -1
sound/firewire/motu/motu-proc.c
··· 107 107 motu->card->proc_root); 108 108 if (root == NULL) 109 109 return; 110 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 110 + root->mode = S_IFDIR | 0555; 111 111 if (snd_info_register(root) < 0) { 112 112 snd_info_free_entry(root); 113 113 return;
+1 -1
sound/firewire/oxfw/oxfw-proc.c
··· 103 103 oxfw->card->proc_root); 104 104 if (root == NULL) 105 105 return; 106 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 106 + root->mode = S_IFDIR | 0555; 107 107 if (snd_info_register(root) < 0) { 108 108 snd_info_free_entry(root); 109 109 return;
+1 -1
sound/firewire/tascam/tascam-proc.c
··· 78 78 tscm->card->proc_root); 79 79 if (root == NULL) 80 80 return; 81 - root->mode = S_IFDIR | S_IRUGO | S_IXUGO; 81 + root->mode = S_IFDIR | 0555; 82 82 if (snd_info_register(root) < 0) { 83 83 snd_info_free_entry(root); 84 84 return;
+16 -16
sound/isa/msnd/msnd_pinnacle.c
··· 757 757 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 758 758 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 759 759 760 - module_param_array(index, int, NULL, S_IRUGO); 760 + module_param_array(index, int, NULL, 0444); 761 761 MODULE_PARM_DESC(index, "Index value for msnd_pinnacle soundcard."); 762 - module_param_array(id, charp, NULL, S_IRUGO); 762 + module_param_array(id, charp, NULL, 0444); 763 763 MODULE_PARM_DESC(id, "ID string for msnd_pinnacle soundcard."); 764 764 765 765 static long io[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; ··· 801 801 MODULE_FIRMWARE(INITCODEFILE); 802 802 MODULE_FIRMWARE(PERMCODEFILE); 803 803 804 - module_param_hw_array(io, long, ioport, NULL, S_IRUGO); 804 + module_param_hw_array(io, long, ioport, NULL, 0444); 805 805 MODULE_PARM_DESC(io, "IO port #"); 806 - module_param_hw_array(irq, int, irq, NULL, S_IRUGO); 807 - module_param_hw_array(mem, long, iomem, NULL, S_IRUGO); 808 - module_param_array(write_ndelay, int, NULL, S_IRUGO); 809 - module_param(calibrate_signal, int, S_IRUGO); 806 + module_param_hw_array(irq, int, irq, NULL, 0444); 807 + module_param_hw_array(mem, long, iomem, NULL, 0444); 808 + module_param_array(write_ndelay, int, NULL, 0444); 809 + module_param(calibrate_signal, int, 0444); 810 810 #ifndef MSND_CLASSIC 811 - module_param_array(digital, int, NULL, S_IRUGO); 812 - module_param_hw_array(cfg, long, ioport, NULL, S_IRUGO); 813 - module_param_array(reset, int, 0, S_IRUGO); 814 - module_param_hw_array(mpu_io, long, ioport, NULL, S_IRUGO); 815 - module_param_hw_array(mpu_irq, int, irq, NULL, S_IRUGO); 816 - module_param_hw_array(ide_io0, long, ioport, NULL, S_IRUGO); 817 - module_param_hw_array(ide_io1, long, ioport, NULL, S_IRUGO); 818 - module_param_hw_array(ide_irq, int, irq, NULL, S_IRUGO); 819 - module_param_hw_array(joystick_io, long, ioport, NULL, S_IRUGO); 811 + module_param_array(digital, int, NULL, 0444); 812 + module_param_hw_array(cfg, long, ioport, NULL, 0444); 813 + module_param_array(reset, int, 0, 0444); 814 + module_param_hw_array(mpu_io, long, ioport, NULL, 0444); 815 + module_param_hw_array(mpu_irq, int, irq, NULL, 0444); 816 + module_param_hw_array(ide_io0, long, ioport, NULL, 0444); 817 + module_param_hw_array(ide_io1, long, ioport, NULL, 0444); 818 + module_param_hw_array(ide_irq, int, irq, NULL, 0444); 819 + module_param_hw_array(joystick_io, long, ioport, NULL, 0444); 820 820 #endif 821 821 822 822
+2 -2
sound/pci/ac97/ac97_proc.c
··· 448 448 if ((entry = snd_info_create_card_entry(ac97->bus->card, name, ac97->bus->proc)) != NULL) { 449 449 snd_info_set_text_ops(entry, ac97, snd_ac97_proc_regs_read); 450 450 #ifdef CONFIG_SND_DEBUG 451 - entry->mode |= S_IWUSR; 451 + entry->mode |= 0200; 452 452 entry->c.text.write = snd_ac97_proc_regs_write; 453 453 #endif 454 454 if (snd_info_register(entry) < 0) { ··· 474 474 475 475 sprintf(name, "codec97#%d", bus->num); 476 476 if ((entry = snd_info_create_card_entry(bus->card, name, bus->card->proc_root)) != NULL) { 477 - entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; 477 + entry->mode = S_IFDIR | 0555; 478 478 if (snd_info_register(entry) < 0) { 479 479 snd_info_free_entry(entry); 480 480 entry = NULL;
+6 -6
sound/pci/asihpi/asihpi.c
··· 69 69 static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; 70 70 static bool enable_hpi_hwdep = 1; 71 71 72 - module_param_array(index, int, NULL, S_IRUGO); 72 + module_param_array(index, int, NULL, 0444); 73 73 MODULE_PARM_DESC(index, "ALSA index value for AudioScience soundcard."); 74 74 75 - module_param_array(id, charp, NULL, S_IRUGO); 75 + module_param_array(id, charp, NULL, 0444); 76 76 MODULE_PARM_DESC(id, "ALSA ID string for AudioScience soundcard."); 77 77 78 - module_param_array(enable, bool, NULL, S_IRUGO); 78 + module_param_array(enable, bool, NULL, 0444); 79 79 MODULE_PARM_DESC(enable, "ALSA enable AudioScience soundcard."); 80 80 81 - module_param(enable_hpi_hwdep, bool, S_IRUGO|S_IWUSR); 81 + module_param(enable_hpi_hwdep, bool, 0644); 82 82 MODULE_PARM_DESC(enable_hpi_hwdep, 83 83 "ALSA enable HPI hwdep for AudioScience soundcard "); 84 84 85 85 /* identify driver */ 86 86 #ifdef KERNEL_ALSA_BUILD 87 87 static char *build_info = "Built using headers from kernel source"; 88 - module_param(build_info, charp, S_IRUGO); 88 + module_param(build_info, charp, 0444); 89 89 MODULE_PARM_DESC(build_info, "Built using headers from kernel source"); 90 90 #else 91 91 static char *build_info = "Built within ALSA source"; 92 - module_param(build_info, charp, S_IRUGO); 92 + module_param(build_info, charp, 0444); 93 93 MODULE_PARM_DESC(build_info, "Built within ALSA source"); 94 94 #endif 95 95
+2 -2
sound/pci/asihpi/hpioctl.c
··· 46 46 #endif 47 47 48 48 static int prealloc_stream_buf; 49 - module_param(prealloc_stream_buf, int, S_IRUGO); 49 + module_param(prealloc_stream_buf, int, 0444); 50 50 MODULE_PARM_DESC(prealloc_stream_buf, 51 51 "Preallocate size for per-adapter stream buffer"); 52 52 53 53 /* Allow the debug level to be changed after module load. 54 54 E.g. echo 2 > /sys/module/asihpi/parameters/hpiDebugLevel 55 55 */ 56 - module_param(hpi_debug_level, int, S_IRUGO | S_IWUSR); 56 + module_param(hpi_debug_level, int, 0644); 57 57 MODULE_PARM_DESC(hpi_debug_level, "debug verbosity 0..5"); 58 58 59 59 /* List of adapters found */
+3 -3
sound/pci/ca0106/ca0106_proc.c
··· 431 431 if(! snd_card_proc_new(emu->card, "ca0106_reg32", &entry)) { 432 432 snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read32); 433 433 entry->c.text.write = snd_ca0106_proc_reg_write32; 434 - entry->mode |= S_IWUSR; 434 + entry->mode |= 0200; 435 435 } 436 436 if(! snd_card_proc_new(emu->card, "ca0106_reg16", &entry)) 437 437 snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read16); ··· 440 440 if(! snd_card_proc_new(emu->card, "ca0106_regs1", &entry)) { 441 441 snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); 442 442 entry->c.text.write = snd_ca0106_proc_reg_write; 443 - entry->mode |= S_IWUSR; 443 + entry->mode |= 0200; 444 444 } 445 445 if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { 446 446 entry->c.text.write = snd_ca0106_proc_i2c_write; 447 447 entry->private_data = emu; 448 - entry->mode |= S_IWUSR; 448 + entry->mode |= 0200; 449 449 } 450 450 if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) 451 451 snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2);
+1 -1
sound/pci/cs46xx/cs46xx_lib.c
··· 2849 2849 entry->private_data = chip; 2850 2850 entry->c.ops = &snd_cs46xx_proc_io_ops; 2851 2851 entry->size = region->size; 2852 - entry->mode = S_IFREG | S_IRUSR; 2852 + entry->mode = S_IFREG | 0400; 2853 2853 } 2854 2854 } 2855 2855 #ifdef CONFIG_SND_CS46XX_NEW_DSP
+7 -7
sound/pci/cs46xx/dsp_spos.c
··· 798 798 799 799 if ((entry = snd_info_create_card_entry(card, "dsp", card->proc_root)) != NULL) { 800 800 entry->content = SNDRV_INFO_CONTENT_TEXT; 801 - entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; 801 + entry->mode = S_IFDIR | 0555; 802 802 803 803 if (snd_info_register(entry) < 0) { 804 804 snd_info_free_entry(entry); ··· 814 814 if ((entry = snd_info_create_card_entry(card, "spos_symbols", ins->proc_dsp_dir)) != NULL) { 815 815 entry->content = SNDRV_INFO_CONTENT_TEXT; 816 816 entry->private_data = chip; 817 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 817 + entry->mode = S_IFREG | 0644; 818 818 entry->c.text.read = cs46xx_dsp_proc_symbol_table_read; 819 819 if (snd_info_register(entry) < 0) { 820 820 snd_info_free_entry(entry); ··· 826 826 if ((entry = snd_info_create_card_entry(card, "spos_modules", ins->proc_dsp_dir)) != NULL) { 827 827 entry->content = SNDRV_INFO_CONTENT_TEXT; 828 828 entry->private_data = chip; 829 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 829 + entry->mode = S_IFREG | 0644; 830 830 entry->c.text.read = cs46xx_dsp_proc_modules_read; 831 831 if (snd_info_register(entry) < 0) { 832 832 snd_info_free_entry(entry); ··· 838 838 if ((entry = snd_info_create_card_entry(card, "parameter", ins->proc_dsp_dir)) != NULL) { 839 839 entry->content = SNDRV_INFO_CONTENT_TEXT; 840 840 entry->private_data = chip; 841 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 841 + entry->mode = S_IFREG | 0644; 842 842 entry->c.text.read = cs46xx_dsp_proc_parameter_dump_read; 843 843 if (snd_info_register(entry) < 0) { 844 844 snd_info_free_entry(entry); ··· 850 850 if ((entry = snd_info_create_card_entry(card, "sample", ins->proc_dsp_dir)) != NULL) { 851 851 entry->content = SNDRV_INFO_CONTENT_TEXT; 852 852 entry->private_data = chip; 853 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 853 + entry->mode = S_IFREG | 0644; 854 854 entry->c.text.read = cs46xx_dsp_proc_sample_dump_read; 855 855 if (snd_info_register(entry) < 0) { 856 856 snd_info_free_entry(entry); ··· 862 862 if ((entry = snd_info_create_card_entry(card, "task_tree", ins->proc_dsp_dir)) != NULL) { 863 863 entry->content = SNDRV_INFO_CONTENT_TEXT; 864 864 entry->private_data = chip; 865 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 865 + entry->mode = S_IFREG | 0644; 866 866 entry->c.text.read = cs46xx_dsp_proc_task_tree_read; 867 867 if (snd_info_register(entry) < 0) { 868 868 snd_info_free_entry(entry); ··· 874 874 if ((entry = snd_info_create_card_entry(card, "scb_info", ins->proc_dsp_dir)) != NULL) { 875 875 entry->content = SNDRV_INFO_CONTENT_TEXT; 876 876 entry->private_data = chip; 877 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 877 + entry->mode = S_IFREG | 0644; 878 878 entry->c.text.read = cs46xx_dsp_proc_scb_read; 879 879 if (snd_info_register(entry) < 0) { 880 880 snd_info_free_entry(entry);
+1 -1
sound/pci/cs46xx/dsp_spos_scb_lib.c
··· 271 271 272 272 entry->content = SNDRV_INFO_CONTENT_TEXT; 273 273 entry->private_data = scb_info; 274 - entry->mode = S_IFREG | S_IRUGO | S_IWUSR; 274 + entry->mode = S_IFREG | 0644; 275 275 276 276 entry->c.text.read = cs46xx_dsp_proc_scb_info_read; 277 277
+1 -1
sound/pci/ctxfi/cttimer.c
··· 17 17 18 18 static bool use_system_timer; 19 19 MODULE_PARM_DESC(use_system_timer, "Force to use system-timer"); 20 - module_param(use_system_timer, bool, S_IRUGO); 20 + module_param(use_system_timer, bool, 0444); 21 21 22 22 struct ct_timer_ops { 23 23 void (*init)(struct ct_timer_instance *);
+2 -2
sound/pci/ctxfi/xfi.c
··· 26 26 static unsigned int reference_rate = 48000; 27 27 static unsigned int multiple = 2; 28 28 MODULE_PARM_DESC(reference_rate, "Reference rate (default=48000)"); 29 - module_param(reference_rate, uint, S_IRUGO); 29 + module_param(reference_rate, uint, 0444); 30 30 MODULE_PARM_DESC(multiple, "Rate multiplier (default=2)"); 31 - module_param(multiple, uint, S_IRUGO); 31 + module_param(multiple, uint, 0444); 32 32 33 33 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; 34 34 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+1 -1
sound/pci/emu10k1/emu10k1x.c
··· 1070 1070 if(! snd_card_proc_new(emu->card, "emu10k1x_regs", &entry)) { 1071 1071 snd_info_set_text_ops(entry, emu, snd_emu10k1x_proc_reg_read); 1072 1072 entry->c.text.write = snd_emu10k1x_proc_reg_write; 1073 - entry->mode |= S_IWUSR; 1073 + entry->mode |= 0200; 1074 1074 entry->private_data = emu; 1075 1075 } 1076 1076
+11 -11
sound/pci/emu10k1/emuproc.c
··· 574 574 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { 575 575 snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read); 576 576 entry->c.text.write = snd_emu_proc_io_reg_write; 577 - entry->mode |= S_IWUSR; 577 + entry->mode |= 0200; 578 578 } 579 579 if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) { 580 580 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00a); 581 581 entry->c.text.write = snd_emu_proc_ptr_reg_write00; 582 - entry->mode |= S_IWUSR; 582 + entry->mode |= 0200; 583 583 } 584 584 if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) { 585 585 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00b); 586 586 entry->c.text.write = snd_emu_proc_ptr_reg_write00; 587 - entry->mode |= S_IWUSR; 587 + entry->mode |= 0200; 588 588 } 589 589 if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) { 590 590 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20a); 591 591 entry->c.text.write = snd_emu_proc_ptr_reg_write20; 592 - entry->mode |= S_IWUSR; 592 + entry->mode |= 0200; 593 593 } 594 594 if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) { 595 595 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20b); 596 596 entry->c.text.write = snd_emu_proc_ptr_reg_write20; 597 - entry->mode |= S_IWUSR; 597 + entry->mode |= 0200; 598 598 } 599 599 if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) { 600 600 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20c); 601 601 entry->c.text.write = snd_emu_proc_ptr_reg_write20; 602 - entry->mode |= S_IWUSR; 602 + entry->mode |= 0200; 603 603 } 604 604 #endif 605 605 ··· 621 621 if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { 622 622 entry->content = SNDRV_INFO_CONTENT_DATA; 623 623 entry->private_data = emu; 624 - entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/; 624 + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; 625 625 entry->size = emu->audigy ? A_TOTAL_SIZE_GPR : TOTAL_SIZE_GPR; 626 626 entry->c.ops = &snd_emu10k1_proc_ops_fx8010; 627 627 } 628 628 if (! snd_card_proc_new(emu->card, "fx8010_tram_data", &entry)) { 629 629 entry->content = SNDRV_INFO_CONTENT_DATA; 630 630 entry->private_data = emu; 631 - entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/; 631 + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; 632 632 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_DATA : TOTAL_SIZE_TANKMEM_DATA ; 633 633 entry->c.ops = &snd_emu10k1_proc_ops_fx8010; 634 634 } 635 635 if (! snd_card_proc_new(emu->card, "fx8010_tram_addr", &entry)) { 636 636 entry->content = SNDRV_INFO_CONTENT_DATA; 637 637 entry->private_data = emu; 638 - entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/; 638 + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; 639 639 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_ADDR : TOTAL_SIZE_TANKMEM_ADDR ; 640 640 entry->c.ops = &snd_emu10k1_proc_ops_fx8010; 641 641 } 642 642 if (! snd_card_proc_new(emu->card, "fx8010_code", &entry)) { 643 643 entry->content = SNDRV_INFO_CONTENT_DATA; 644 644 entry->private_data = emu; 645 - entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/; 645 + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; 646 646 entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE; 647 647 entry->c.ops = &snd_emu10k1_proc_ops_fx8010; 648 648 } 649 649 if (! snd_card_proc_new(emu->card, "fx8010_acode", &entry)) { 650 650 entry->content = SNDRV_INFO_CONTENT_TEXT; 651 651 entry->private_data = emu; 652 - entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/; 652 + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; 653 653 entry->c.text.read = snd_emu10k1_proc_acode_read; 654 654 } 655 655 return 0;
+1 -1
sound/pci/hda/patch_hdmi.c
··· 510 510 511 511 snd_info_set_text_ops(entry, per_pin, print_eld_info); 512 512 entry->c.text.write = write_eld_info; 513 - entry->mode |= S_IWUSR; 513 + entry->mode |= 0200; 514 514 per_pin->proc_entry = entry; 515 515 516 516 return 0;
+1 -1
sound/pci/ice1712/pontis.c
··· 662 662 struct snd_info_entry *entry; 663 663 if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) { 664 664 snd_info_set_text_ops(entry, ice, wm_proc_regs_read); 665 - entry->mode |= S_IWUSR; 665 + entry->mode |= 0200; 666 666 entry->c.text.write = wm_proc_regs_write; 667 667 } 668 668 }
+1 -1
sound/pci/ice1712/prodigy_hifi.c
··· 926 926 struct snd_info_entry *entry; 927 927 if (!snd_card_proc_new(ice->card, "wm_codec", &entry)) { 928 928 snd_info_set_text_ops(entry, ice, wm_proc_regs_read); 929 - entry->mode |= S_IWUSR; 929 + entry->mode |= 0200; 930 930 entry->c.text.write = wm_proc_regs_write; 931 931 } 932 932 }
+1 -1
sound/pci/lola/lola_proc.c
··· 214 214 snd_info_set_text_ops(entry, chip, lola_proc_codec_read); 215 215 if (!snd_card_proc_new(chip->card, "codec_rw", &entry)) { 216 216 snd_info_set_text_ops(entry, chip, lola_proc_codec_rw_read); 217 - entry->mode |= S_IWUSR; 217 + entry->mode |= 0200; 218 218 entry->c.text.write = lola_proc_codec_rw_write; 219 219 } 220 220 if (!snd_card_proc_new(chip->card, "regs", &entry))
+1 -1
sound/pci/pcxhr/pcxhr.c
··· 1465 1465 !snd_card_proc_new(chip->card, "gpio", &entry)) { 1466 1466 snd_info_set_text_ops(entry, chip, pcxhr_proc_gpio_read); 1467 1467 entry->c.text.write = pcxhr_proc_gpo_write; 1468 - entry->mode |= S_IWUSR; 1468 + entry->mode |= 0200; 1469 1469 } 1470 1470 if (!snd_card_proc_new(chip->card, "ltc", &entry)) 1471 1471 snd_info_set_text_ops(entry, chip, pcxhr_proc_ltc);
+4 -4
sound/soc/codecs/cs43130.c
··· 1733 1733 return cs43130_show_ac(dev, buf, HP_RIGHT); 1734 1734 } 1735 1735 1736 - static DEVICE_ATTR(hpload_dc_l, S_IRUGO, cs43130_show_dc_l, NULL); 1737 - static DEVICE_ATTR(hpload_dc_r, S_IRUGO, cs43130_show_dc_r, NULL); 1738 - static DEVICE_ATTR(hpload_ac_l, S_IRUGO, cs43130_show_ac_l, NULL); 1739 - static DEVICE_ATTR(hpload_ac_r, S_IRUGO, cs43130_show_ac_r, NULL); 1736 + static DEVICE_ATTR(hpload_dc_l, 0444, cs43130_show_dc_l, NULL); 1737 + static DEVICE_ATTR(hpload_dc_r, 0444, cs43130_show_dc_r, NULL); 1738 + static DEVICE_ATTR(hpload_ac_l, 0444, cs43130_show_ac_l, NULL); 1739 + static DEVICE_ATTR(hpload_ac_r, 0444, cs43130_show_ac_r, NULL); 1740 1740 1741 1741 static struct reg_sequence hp_en_cal_seq[] = { 1742 1742 {CS43130_INT_MASK_4, CS43130_INT_MASK_ALL},
+5 -6
sound/soc/codecs/wm_adsp.c
··· 627 627 if (!root) 628 628 goto err; 629 629 630 - if (!debugfs_create_bool("booted", S_IRUGO, root, &dsp->booted)) 630 + if (!debugfs_create_bool("booted", 0444, root, &dsp->booted)) 631 631 goto err; 632 632 633 - if (!debugfs_create_bool("running", S_IRUGO, root, &dsp->running)) 633 + if (!debugfs_create_bool("running", 0444, root, &dsp->running)) 634 634 goto err; 635 635 636 - if (!debugfs_create_x32("fw_id", S_IRUGO, root, &dsp->fw_id)) 636 + if (!debugfs_create_x32("fw_id", 0444, root, &dsp->fw_id)) 637 637 goto err; 638 638 639 - if (!debugfs_create_x32("fw_version", S_IRUGO, root, 640 - &dsp->fw_id_version)) 639 + if (!debugfs_create_x32("fw_version", 0444, root, &dsp->fw_id_version)) 641 640 goto err; 642 641 643 642 for (i = 0; i < ARRAY_SIZE(wm_adsp_debugfs_fops); ++i) { 644 643 if (!debugfs_create_file(wm_adsp_debugfs_fops[i].name, 645 - S_IRUGO, root, dsp, 644 + 0444, root, dsp, 646 645 &wm_adsp_debugfs_fops[i].fops)) 647 646 goto err; 648 647 }
+1 -1
sound/soc/fsl/fsl_ssi_dbg.c
··· 146 146 if (!ssi_dbg->dbg_dir) 147 147 return -ENOMEM; 148 148 149 - ssi_dbg->dbg_stats = debugfs_create_file("stats", S_IRUGO, 149 + ssi_dbg->dbg_stats = debugfs_create_file("stats", 0444, 150 150 ssi_dbg->dbg_dir, ssi_dbg, 151 151 &fsl_ssi_stats_ops); 152 152 if (!ssi_dbg->dbg_stats) {
+3 -3
sound/sound_core.c
··· 413 413 break; 414 414 } 415 415 return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit, 416 - name, S_IRUSR | S_IWUSR, dev); 416 + name, 0600, dev); 417 417 } 418 418 419 419 EXPORT_SYMBOL(register_sound_special_device); ··· 440 440 int register_sound_mixer(const struct file_operations *fops, int dev) 441 441 { 442 442 return sound_insert_unit(&chains[0], fops, dev, 0, 128, 443 - "mixer", S_IRUSR | S_IWUSR, NULL); 443 + "mixer", 0600, NULL); 444 444 } 445 445 446 446 EXPORT_SYMBOL(register_sound_mixer); ··· 468 468 int register_sound_dsp(const struct file_operations *fops, int dev) 469 469 { 470 470 return sound_insert_unit(&chains[3], fops, dev, 3, 131, 471 - "dsp", S_IWUSR | S_IRUSR, NULL); 471 + "dsp", 0600, NULL); 472 472 } 473 473 474 474 EXPORT_SYMBOL(register_sound_dsp);
+1 -1
sound/sparc/dbri.c
··· 2518 2518 #ifdef DBRI_DEBUG 2519 2519 if (!snd_card_proc_new(card, "debug", &entry)) { 2520 2520 snd_info_set_text_ops(entry, dbri, dbri_debug_read); 2521 - entry->mode = S_IFREG | S_IRUGO; /* Readable only. */ 2521 + entry->mode = S_IFREG | 0444; /* Readable only. */ 2522 2522 } 2523 2523 #endif 2524 2524 }