sound: Use octal not symbolic permissions
authorJoe Perches <joe@perches.com>
Wed, 23 May 2018 19:20:59 +0000 (12:20 -0700)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 May 2018 09:27:20 +0000 (11:27 +0200)
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>
41 files changed:
sound/core/compress_offload.c
sound/core/info.c
sound/core/init.c
sound/core/oss/mixer_oss.c
sound/core/oss/pcm_oss.c
sound/core/pcm.c
sound/core/pcm_memory.c
sound/drivers/dummy.c
sound/drivers/mts64.c
sound/drivers/opl4/opl4_proc.c
sound/drivers/portman2x4.c
sound/firewire/bebob/bebob_proc.c
sound/firewire/dice/dice-proc.c
sound/firewire/digi00x/digi00x-proc.c
sound/firewire/fireface/ff-proc.c
sound/firewire/fireworks/fireworks_proc.c
sound/firewire/motu/motu-proc.c
sound/firewire/oxfw/oxfw-proc.c
sound/firewire/tascam/tascam-proc.c
sound/isa/msnd/msnd_pinnacle.c
sound/pci/ac97/ac97_proc.c
sound/pci/asihpi/asihpi.c
sound/pci/asihpi/hpioctl.c
sound/pci/ca0106/ca0106_proc.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/cs46xx/dsp_spos.c
sound/pci/cs46xx/dsp_spos_scb_lib.c
sound/pci/ctxfi/cttimer.c
sound/pci/ctxfi/xfi.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/emu10k1/emuproc.c
sound/pci/hda/patch_hdmi.c
sound/pci/ice1712/pontis.c
sound/pci/ice1712/prodigy_hifi.c
sound/pci/lola/lola_proc.c
sound/pci/pcxhr/pcxhr.c
sound/soc/codecs/cs43130.c
sound/soc/codecs/wm_adsp.c
sound/soc/fsl/fsl_ssi_dbg.c
sound/sound_core.c
sound/sparc/dbri.c

index 4563432..4b01a37 100644 (file)
@@ -1001,7 +1001,7 @@ static int snd_compress_proc_init(struct snd_compr *compr)
                                           compr->card->proc_root);
        if (!entry)
                return -ENOMEM;
-       entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       entry->mode = S_IFDIR | 0555;
        if (snd_info_register(entry) < 0) {
                snd_info_free_entry(entry);
                return -ENOMEM;
index 4b36767..fe502bc 100644 (file)
@@ -454,7 +454,7 @@ static struct snd_info_entry *create_subdir(struct module *mod,
        entry = snd_info_create_module_entry(mod, name, NULL);
        if (!entry)
                return NULL;
-       entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       entry->mode = S_IFDIR | 0555;
        if (snd_info_register(entry) < 0) {
                snd_info_free_entry(entry);
                return NULL;
@@ -470,7 +470,7 @@ int __init snd_info_init(void)
        snd_proc_root = snd_info_create_entry("asound", NULL);
        if (!snd_proc_root)
                return -ENOMEM;
-       snd_proc_root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       snd_proc_root->mode = S_IFDIR | 0555;
        snd_proc_root->p = proc_mkdir("asound", NULL);
        if (!snd_proc_root->p)
                goto error;
@@ -716,7 +716,7 @@ snd_info_create_entry(const char *name, struct snd_info_entry *parent)
                kfree(entry);
                return NULL;
        }
-       entry->mode = S_IFREG | S_IRUGO;
+       entry->mode = S_IFREG | 0444;
        entry->content = SNDRV_INFO_CONTENT_TEXT;
        mutex_init(&entry->access);
        INIT_LIST_HEAD(&entry->children);
index 79b4df1..4849c61 100644 (file)
@@ -703,7 +703,7 @@ card_id_store_attr(struct device *dev, struct device_attribute *attr,
        return count;
 }
 
-static DEVICE_ATTR(id, S_IRUGO | S_IWUSR, card_id_show_attr, card_id_store_attr);
+static DEVICE_ATTR(id, 0644, card_id_show_attr, card_id_store_attr);
 
 static ssize_t
 card_number_show_attr(struct device *dev,
@@ -713,7 +713,7 @@ card_number_show_attr(struct device *dev,
        return scnprintf(buf, PAGE_SIZE, "%i\n", card->number);
 }
 
-static DEVICE_ATTR(number, S_IRUGO, card_number_show_attr, NULL);
+static DEVICE_ATTR(number, 0444, card_number_show_attr, NULL);
 
 static struct attribute *card_dev_attrs[] = {
        &dev_attr_id.attr,
index 379bf48..64d904b 100644 (file)
@@ -1247,7 +1247,7 @@ static void snd_mixer_oss_proc_init(struct snd_mixer_oss *mixer)
        if (! entry)
                return;
        entry->content = SNDRV_INFO_CONTENT_TEXT;
-       entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+       entry->mode = S_IFREG | 0644;
        entry->c.text.read = snd_mixer_oss_proc_read;
        entry->c.text.write = snd_mixer_oss_proc_write;
        entry->private_data = mixer;
index 1980f68..905a53c 100644 (file)
@@ -3045,7 +3045,7 @@ static void snd_pcm_oss_proc_init(struct snd_pcm *pcm)
                        continue;
                if ((entry = snd_info_create_card_entry(pcm->card, "oss", pstr->proc_root)) != NULL) {
                        entry->content = SNDRV_INFO_CONTENT_TEXT;
-                       entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+                       entry->mode = S_IFREG | 0644;
                        entry->c.text.read = snd_pcm_oss_proc_read;
                        entry->c.text.write = snd_pcm_oss_proc_write;
                        entry->private_data = pstr;
index 66ac89a..c352bfb 100644 (file)
@@ -530,7 +530,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
                                           pcm->card->proc_root);
        if (!entry)
                return -ENOMEM;
-       entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       entry->mode = S_IFDIR | 0555;
        if (snd_info_register(entry) < 0) {
                snd_info_free_entry(entry);
                return -ENOMEM;
@@ -552,7 +552,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
        if (entry) {
                entry->c.text.read = snd_pcm_xrun_debug_read;
                entry->c.text.write = snd_pcm_xrun_debug_write;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->private_data = pstr;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -590,7 +590,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
                                           substream->pstr->proc_root);
        if (!entry)
                return -ENOMEM;
-       entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       entry->mode = S_IFDIR | 0555;
        if (snd_info_register(entry) < 0) {
                snd_info_free_entry(entry);
                return -ENOMEM;
@@ -647,7 +647,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
                entry->private_data = substream;
                entry->c.text.read = NULL;
                entry->c.text.write = snd_pcm_xrun_injection_write;
-               entry->mode = S_IFREG | S_IWUSR;
+               entry->mode = S_IFREG | 0200;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;
@@ -1087,7 +1087,7 @@ static ssize_t show_pcm_class(struct device *dev,
         return snprintf(buf, PAGE_SIZE, "%s\n", str);
 }
 
-static DEVICE_ATTR(pcm_class, S_IRUGO, show_pcm_class, NULL);
+static DEVICE_ATTR(pcm_class, 0444, show_pcm_class, NULL);
 static struct attribute *pcm_dev_attrs[] = {
        &dev_attr_pcm_class.attr,
        NULL
index ae33e45..4b5356a 100644 (file)
@@ -201,7 +201,7 @@ static inline void preallocate_info_init(struct snd_pcm_substream *substream)
        if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) {
                entry->c.text.read = snd_pcm_lib_preallocate_proc_read;
                entry->c.text.write = snd_pcm_lib_preallocate_proc_write;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->private_data = substream;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
index 8fb9a54..9af154d 100644 (file)
@@ -1042,7 +1042,7 @@ static void dummy_proc_init(struct snd_dummy *chip)
        if (!snd_card_proc_new(chip->card, "dummy_pcm", &entry)) {
                snd_info_set_text_ops(entry, chip, dummy_proc_read);
                entry->c.text.write = dummy_proc_write;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->private_data = chip;
        }
 }
index f32e813..b68e71c 100644 (file)
@@ -41,11 +41,11 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
 static struct platform_device *platform_devices[SNDRV_CARDS]; 
 static int device_count;
 
-module_param_array(index, int, NULL, S_IRUGO);
+module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
-module_param_array(id, charp, NULL, S_IRUGO);
+module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
-module_param_array(enable, bool, NULL, S_IRUGO);
+module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
 
 MODULE_AUTHOR("Matthias Koenig <mk@phasorlab.de>");
index cd2c07f..16b2409 100644 (file)
@@ -104,7 +104,7 @@ int snd_opl4_create_proc(struct snd_opl4 *opl4)
        if (entry) {
                if (opl4->hardware < OPL3_HW_OPL4_ML) {
                        /* OPL4 can access 4 MB external ROM/SRAM */
-                       entry->mode |= S_IWUSR;
+                       entry->mode |= 0200;
                        entry->size = 4 * 1024 * 1024;
                } else {
                        /* OPL4-ML has 1 MB internal ROM */
index ec8a943..3cdf0a8 100644 (file)
@@ -60,11 +60,11 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
 static struct platform_device *platform_devices[SNDRV_CARDS]; 
 static int device_count;
 
-module_param_array(index, int, NULL, S_IRUGO);
+module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
-module_param_array(id, charp, NULL, S_IRUGO);
+module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
-module_param_array(enable, bool, NULL, S_IRUGO);
+module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
 
 MODULE_AUTHOR("Levent Guendogdu, Tobias Gehrig, Matthias Koenig");
index ec24f96..8096891 100644 (file)
@@ -183,7 +183,7 @@ void snd_bebob_proc_init(struct snd_bebob *bebob)
                                          bebob->card->proc_root);
        if (root == NULL)
                return;
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index faf8c85..bb870fc 100644 (file)
@@ -305,7 +305,7 @@ void snd_dice_create_proc(struct snd_dice *dice)
                                          dice->card->proc_root);
        if (!root)
                return;
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index a1d601f..6996d5a 100644 (file)
@@ -79,7 +79,7 @@ void snd_dg00x_proc_init(struct snd_dg00x *dg00x)
        if (root == NULL)
                return;
 
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index 69441d1..40ccbfd 100644 (file)
@@ -52,7 +52,7 @@ void snd_ff_proc_init(struct snd_ff *ff)
                                          ff->card->proc_root);
        if (root == NULL)
                return;
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index 9c21f31..779ecec 100644 (file)
@@ -219,7 +219,7 @@ void snd_efw_proc_init(struct snd_efw *efw)
                                          efw->card->proc_root);
        if (root == NULL)
                return;
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index 4edc064..ab6830a 100644 (file)
@@ -107,7 +107,7 @@ void snd_motu_proc_init(struct snd_motu *motu)
                                          motu->card->proc_root);
        if (root == NULL)
                return;
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index 8ba4f9f..27dac07 100644 (file)
@@ -103,7 +103,7 @@ void snd_oxfw_proc_init(struct snd_oxfw *oxfw)
                                          oxfw->card->proc_root);
        if (root == NULL)
                return;
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index bfd4a4c..fee3bf3 100644 (file)
@@ -78,7 +78,7 @@ void snd_tscm_proc_init(struct snd_tscm *tscm)
                                          tscm->card->proc_root);
        if (root == NULL)
                return;
-       root->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+       root->mode = S_IFDIR | 0555;
        if (snd_info_register(root) < 0) {
                snd_info_free_entry(root);
                return;
index 45e561c..6c584d9 100644 (file)
@@ -757,9 +757,9 @@ static int snd_msnd_pinnacle_cfg_reset(int cfg)
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;     /* Index 0-MAX */
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;      /* ID for this card */
 
-module_param_array(index, int, NULL, S_IRUGO);
+module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for msnd_pinnacle soundcard.");
-module_param_array(id, charp, NULL, S_IRUGO);
+module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ID string for msnd_pinnacle soundcard.");
 
 static long io[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
@@ -801,22 +801,22 @@ MODULE_LICENSE("GPL");
 MODULE_FIRMWARE(INITCODEFILE);
 MODULE_FIRMWARE(PERMCODEFILE);
 
-module_param_hw_array(io, long, ioport, NULL, S_IRUGO);
+module_param_hw_array(io, long, ioport, NULL, 0444);
 MODULE_PARM_DESC(io, "IO port #");
-module_param_hw_array(irq, int, irq, NULL, S_IRUGO);
-module_param_hw_array(mem, long, iomem, NULL, S_IRUGO);
-module_param_array(write_ndelay, int, NULL, S_IRUGO);
-module_param(calibrate_signal, int, S_IRUGO);
+module_param_hw_array(irq, int, irq, NULL, 0444);
+module_param_hw_array(mem, long, iomem, NULL, 0444);
+module_param_array(write_ndelay, int, NULL, 0444);
+module_param(calibrate_signal, int, 0444);
 #ifndef MSND_CLASSIC
-module_param_array(digital, int, NULL, S_IRUGO);
-module_param_hw_array(cfg, long, ioport, NULL, S_IRUGO);
-module_param_array(reset, int, 0, S_IRUGO);
-module_param_hw_array(mpu_io, long, ioport, NULL, S_IRUGO);
-module_param_hw_array(mpu_irq, int, irq, NULL, S_IRUGO);
-module_param_hw_array(ide_io0, long, ioport, NULL, S_IRUGO);
-module_param_hw_array(ide_io1, long, ioport, NULL, S_IRUGO);
-module_param_hw_array(ide_irq, int, irq, NULL, S_IRUGO);
-module_param_hw_array(joystick_io, long, ioport, NULL, S_IRUGO);
+module_param_array(digital, int, NULL, 0444);
+module_param_hw_array(cfg, long, ioport, NULL, 0444);
+module_param_array(reset, int, 0, 0444);
+module_param_hw_array(mpu_io, long, ioport, NULL, 0444);
+module_param_hw_array(mpu_irq, int, irq, NULL, 0444);
+module_param_hw_array(ide_io0, long, ioport, NULL, 0444);
+module_param_hw_array(ide_io1, long, ioport, NULL, 0444);
+module_param_hw_array(ide_irq, int, irq, NULL, 0444);
+module_param_hw_array(joystick_io, long, ioport, NULL, 0444);
 #endif
 
 
index 6320bf0..e120a11 100644 (file)
@@ -448,7 +448,7 @@ void snd_ac97_proc_init(struct snd_ac97 * ac97)
        if ((entry = snd_info_create_card_entry(ac97->bus->card, name, ac97->bus->proc)) != NULL) {
                snd_info_set_text_ops(entry, ac97, snd_ac97_proc_regs_read);
 #ifdef CONFIG_SND_DEBUG
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->c.text.write = snd_ac97_proc_regs_write;
 #endif
                if (snd_info_register(entry) < 0) {
@@ -474,7 +474,7 @@ void snd_ac97_bus_proc_init(struct snd_ac97_bus * bus)
 
        sprintf(name, "codec97#%d", bus->num);
        if ((entry = snd_info_create_card_entry(bus->card, name, bus->card->proc_root)) != NULL) {
-               entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+               entry->mode = S_IFDIR | 0555;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
                        entry = NULL;
index 7203614..64e0961 100644 (file)
@@ -69,27 +69,27 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;   /* ID for this card */
 static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
 static bool enable_hpi_hwdep = 1;
 
-module_param_array(index, int, NULL, S_IRUGO);
+module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "ALSA index value for AudioScience soundcard.");
 
-module_param_array(id, charp, NULL, S_IRUGO);
+module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ALSA ID string for AudioScience soundcard.");
 
-module_param_array(enable, bool, NULL, S_IRUGO);
+module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, "ALSA enable AudioScience soundcard.");
 
-module_param(enable_hpi_hwdep, bool, S_IRUGO|S_IWUSR);
+module_param(enable_hpi_hwdep, bool, 0644);
 MODULE_PARM_DESC(enable_hpi_hwdep,
                "ALSA enable HPI hwdep for AudioScience soundcard ");
 
 /* identify driver */
 #ifdef KERNEL_ALSA_BUILD
 static char *build_info = "Built using headers from kernel source";
-module_param(build_info, charp, S_IRUGO);
+module_param(build_info, charp, 0444);
 MODULE_PARM_DESC(build_info, "Built using headers from kernel source");
 #else
 static char *build_info = "Built within ALSA source";
-module_param(build_info, charp, S_IRUGO);
+module_param(build_info, charp, 0444);
 MODULE_PARM_DESC(build_info, "Built within ALSA source");
 #endif
 
index b1a2a7e..7d04956 100644 (file)
@@ -46,14 +46,14 @@ MODULE_FIRMWARE("asihpi/dsp8900.bin");
 #endif
 
 static int prealloc_stream_buf;
-module_param(prealloc_stream_buf, int, S_IRUGO);
+module_param(prealloc_stream_buf, int, 0444);
 MODULE_PARM_DESC(prealloc_stream_buf,
        "Preallocate size for per-adapter stream buffer");
 
 /* Allow the debug level to be changed after module load.
  E.g.   echo 2 > /sys/module/asihpi/parameters/hpiDebugLevel
 */
-module_param(hpi_debug_level, int, S_IRUGO | S_IWUSR);
+module_param(hpi_debug_level, int, 0644);
 MODULE_PARM_DESC(hpi_debug_level, "debug verbosity 0..5");
 
 /* List of adapters found */
index 9b2b8b3..a2c85cc 100644 (file)
@@ -431,7 +431,7 @@ int snd_ca0106_proc_init(struct snd_ca0106 *emu)
        if(! snd_card_proc_new(emu->card, "ca0106_reg32", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read32);
                entry->c.text.write = snd_ca0106_proc_reg_write32;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if(! snd_card_proc_new(emu->card, "ca0106_reg16", &entry))
                snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read16);
@@ -440,12 +440,12 @@ int snd_ca0106_proc_init(struct snd_ca0106 *emu)
        if(! snd_card_proc_new(emu->card, "ca0106_regs1", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1);
                entry->c.text.write = snd_ca0106_proc_reg_write;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) {
                entry->c.text.write = snd_ca0106_proc_i2c_write;
                entry->private_data = emu;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) 
                snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2);
index 0020fd0..ed1251c 100644 (file)
@@ -2849,7 +2849,7 @@ static int snd_cs46xx_proc_init(struct snd_card *card, struct snd_cs46xx *chip)
                        entry->private_data = chip;
                        entry->c.ops = &snd_cs46xx_proc_io_ops;
                        entry->size = region->size;
-                       entry->mode = S_IFREG | S_IRUSR;
+                       entry->mode = S_IFREG | 0400;
                }
        }
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
index aa61615..c44eade 100644 (file)
@@ -798,7 +798,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
 
        if ((entry = snd_info_create_card_entry(card, "dsp", card->proc_root)) != NULL) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+               entry->mode = S_IFDIR | 0555;
       
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -814,7 +814,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
        if ((entry = snd_info_create_card_entry(card, "spos_symbols", ins->proc_dsp_dir)) != NULL) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = chip;
-               entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+               entry->mode = S_IFREG | 0644;
                entry->c.text.read = cs46xx_dsp_proc_symbol_table_read;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -826,7 +826,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
        if ((entry = snd_info_create_card_entry(card, "spos_modules", ins->proc_dsp_dir)) != NULL) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = chip;
-               entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+               entry->mode = S_IFREG | 0644;
                entry->c.text.read = cs46xx_dsp_proc_modules_read;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -838,7 +838,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
        if ((entry = snd_info_create_card_entry(card, "parameter", ins->proc_dsp_dir)) != NULL) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = chip;
-               entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+               entry->mode = S_IFREG | 0644;
                entry->c.text.read = cs46xx_dsp_proc_parameter_dump_read;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -850,7 +850,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
        if ((entry = snd_info_create_card_entry(card, "sample", ins->proc_dsp_dir)) != NULL) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = chip;
-               entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+               entry->mode = S_IFREG | 0644;
                entry->c.text.read = cs46xx_dsp_proc_sample_dump_read;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -862,7 +862,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
        if ((entry = snd_info_create_card_entry(card, "task_tree", ins->proc_dsp_dir)) != NULL) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = chip;
-               entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+               entry->mode = S_IFREG | 0644;
                entry->c.text.read = cs46xx_dsp_proc_task_tree_read;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
@@ -874,7 +874,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
        if ((entry = snd_info_create_card_entry(card, "scb_info", ins->proc_dsp_dir)) != NULL) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = chip;
-               entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+               entry->mode = S_IFREG | 0644;
                entry->c.text.read = cs46xx_dsp_proc_scb_read;
                if (snd_info_register(entry) < 0) {
                        snd_info_free_entry(entry);
index 7488e1b..abb01ce 100644 (file)
@@ -271,7 +271,7 @@ void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip,
       
                        entry->content = SNDRV_INFO_CONTENT_TEXT;
                        entry->private_data = scb_info;
-                       entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
+                       entry->mode = S_IFREG | 0644;
       
                        entry->c.text.read = cs46xx_dsp_proc_scb_info_read;
       
index 08e874e..2099e9c 100644 (file)
@@ -17,7 +17,7 @@
 
 static bool use_system_timer;
 MODULE_PARM_DESC(use_system_timer, "Force to use system-timer");
-module_param(use_system_timer, bool, S_IRUGO);
+module_param(use_system_timer, bool, 0444);
 
 struct ct_timer_ops {
        void (*init)(struct ct_timer_instance *);
index f2f3277..b287422 100644 (file)
@@ -26,9 +26,9 @@ MODULE_SUPPORTED_DEVICE("{{Creative Labs, Sound Blaster X-Fi}");
 static unsigned int reference_rate = 48000;
 static unsigned int multiple = 2;
 MODULE_PARM_DESC(reference_rate, "Reference rate (default=48000)");
-module_param(reference_rate, uint, S_IRUGO);
+module_param(reference_rate, uint, 0444);
 MODULE_PARM_DESC(multiple, "Rate multiplier (default=2)");
-module_param(multiple, uint, S_IRUGO);
+module_param(multiple, uint, 0444);
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
index 2c2b12a..611589c 100644 (file)
@@ -1070,7 +1070,7 @@ static int snd_emu10k1x_proc_init(struct emu10k1x *emu)
        if(! snd_card_proc_new(emu->card, "emu10k1x_regs", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_emu10k1x_proc_reg_read);
                entry->c.text.write = snd_emu10k1x_proc_reg_write;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->private_data = emu;
        }
        
index 055227c..b570080 100644 (file)
@@ -574,32 +574,32 @@ int snd_emu10k1_proc_init(struct snd_emu10k1 *emu)
        if (! snd_card_proc_new(emu->card, "io_regs", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read);
                entry->c.text.write = snd_emu_proc_io_reg_write;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00a);
                entry->c.text.write = snd_emu_proc_ptr_reg_write00;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00b);
                entry->c.text.write = snd_emu_proc_ptr_reg_write00;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20a);
                entry->c.text.write = snd_emu_proc_ptr_reg_write20;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20b);
                entry->c.text.write = snd_emu_proc_ptr_reg_write20;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) {
                snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20c);
                entry->c.text.write = snd_emu_proc_ptr_reg_write20;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
 #endif
        
@@ -621,35 +621,35 @@ int snd_emu10k1_proc_init(struct snd_emu10k1 *emu)
        if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) {
                entry->content = SNDRV_INFO_CONTENT_DATA;
                entry->private_data = emu;
-               entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/;
+               entry->mode = S_IFREG | 0444 /*| S_IWUSR*/;
                entry->size = emu->audigy ? A_TOTAL_SIZE_GPR : TOTAL_SIZE_GPR;
                entry->c.ops = &snd_emu10k1_proc_ops_fx8010;
        }
        if (! snd_card_proc_new(emu->card, "fx8010_tram_data", &entry)) {
                entry->content = SNDRV_INFO_CONTENT_DATA;
                entry->private_data = emu;
-               entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/;
+               entry->mode = S_IFREG | 0444 /*| S_IWUSR*/;
                entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_DATA : TOTAL_SIZE_TANKMEM_DATA ;
                entry->c.ops = &snd_emu10k1_proc_ops_fx8010;
        }
        if (! snd_card_proc_new(emu->card, "fx8010_tram_addr", &entry)) {
                entry->content = SNDRV_INFO_CONTENT_DATA;
                entry->private_data = emu;
-               entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/;
+               entry->mode = S_IFREG | 0444 /*| S_IWUSR*/;
                entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_ADDR : TOTAL_SIZE_TANKMEM_ADDR ;
                entry->c.ops = &snd_emu10k1_proc_ops_fx8010;
        }
        if (! snd_card_proc_new(emu->card, "fx8010_code", &entry)) {
                entry->content = SNDRV_INFO_CONTENT_DATA;
                entry->private_data = emu;
-               entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/;
+               entry->mode = S_IFREG | 0444 /*| S_IWUSR*/;
                entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE;
                entry->c.ops = &snd_emu10k1_proc_ops_fx8010;
        }
        if (! snd_card_proc_new(emu->card, "fx8010_acode", &entry)) {
                entry->content = SNDRV_INFO_CONTENT_TEXT;
                entry->private_data = emu;
-               entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/;
+               entry->mode = S_IFREG | 0444 /*| S_IWUSR*/;
                entry->c.text.read = snd_emu10k1_proc_acode_read;
        }
        return 0;
index 7d7eb13..8840daf 100644 (file)
@@ -510,7 +510,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
 
        snd_info_set_text_ops(entry, per_pin, print_eld_info);
        entry->c.text.write = write_eld_info;
-       entry->mode |= S_IWUSR;
+       entry->mode |= 0200;
        per_pin->proc_entry = entry;
 
        return 0;
index 5101f40..93b8cfc 100644 (file)
@@ -662,7 +662,7 @@ static void wm_proc_init(struct snd_ice1712 *ice)
        struct snd_info_entry *entry;
        if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) {
                snd_info_set_text_ops(entry, ice, wm_proc_regs_read);
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->c.text.write = wm_proc_regs_write;
        }
 }
index 8dabd4d..d7366ad 100644 (file)
@@ -926,7 +926,7 @@ static void wm_proc_init(struct snd_ice1712 *ice)
        struct snd_info_entry *entry;
        if (!snd_card_proc_new(ice->card, "wm_codec", &entry)) {
                snd_info_set_text_ops(entry, ice, wm_proc_regs_read);
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->c.text.write = wm_proc_regs_write;
        }
 }
index c241dc0..904e3c4 100644 (file)
@@ -214,7 +214,7 @@ void lola_proc_debug_new(struct lola *chip)
                snd_info_set_text_ops(entry, chip, lola_proc_codec_read);
        if (!snd_card_proc_new(chip->card, "codec_rw", &entry)) {
                snd_info_set_text_ops(entry, chip, lola_proc_codec_rw_read);
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
                entry->c.text.write = lola_proc_codec_rw_write;
        }
        if (!snd_card_proc_new(chip->card, "regs", &entry))
index f9ae72f..e57da40 100644 (file)
@@ -1465,7 +1465,7 @@ static void pcxhr_proc_init(struct snd_pcxhr *chip)
            !snd_card_proc_new(chip->card, "gpio", &entry)) {
                snd_info_set_text_ops(entry, chip, pcxhr_proc_gpio_read);
                entry->c.text.write = pcxhr_proc_gpo_write;
-               entry->mode |= S_IWUSR;
+               entry->mode |= 0200;
        }
        if (!snd_card_proc_new(chip->card, "ltc", &entry))
                snd_info_set_text_ops(entry, chip, pcxhr_proc_ltc);
index feca0a6..80dc421 100644 (file)
@@ -1733,10 +1733,10 @@ static ssize_t cs43130_show_ac_r(struct device *dev,
        return cs43130_show_ac(dev, buf, HP_RIGHT);
 }
 
-static DEVICE_ATTR(hpload_dc_l, S_IRUGO, cs43130_show_dc_l, NULL);
-static DEVICE_ATTR(hpload_dc_r, S_IRUGO, cs43130_show_dc_r, NULL);
-static DEVICE_ATTR(hpload_ac_l, S_IRUGO, cs43130_show_ac_l, NULL);
-static DEVICE_ATTR(hpload_ac_r, S_IRUGO, cs43130_show_ac_r, NULL);
+static DEVICE_ATTR(hpload_dc_l, 0444, cs43130_show_dc_l, NULL);
+static DEVICE_ATTR(hpload_dc_r, 0444, cs43130_show_dc_r, NULL);
+static DEVICE_ATTR(hpload_ac_l, 0444, cs43130_show_ac_l, NULL);
+static DEVICE_ATTR(hpload_ac_r, 0444, cs43130_show_ac_r, NULL);
 
 static struct reg_sequence hp_en_cal_seq[] = {
        {CS43130_INT_MASK_4, CS43130_INT_MASK_ALL},
index 82b0927..af062c4 100644 (file)
@@ -627,22 +627,21 @@ static void wm_adsp2_init_debugfs(struct wm_adsp *dsp,
        if (!root)
                goto err;
 
-       if (!debugfs_create_bool("booted", S_IRUGO, root, &dsp->booted))
+       if (!debugfs_create_bool("booted", 0444, root, &dsp->booted))
                goto err;
 
-       if (!debugfs_create_bool("running", S_IRUGO, root, &dsp->running))
+       if (!debugfs_create_bool("running", 0444, root, &dsp->running))
                goto err;
 
-       if (!debugfs_create_x32("fw_id", S_IRUGO, root, &dsp->fw_id))
+       if (!debugfs_create_x32("fw_id", 0444, root, &dsp->fw_id))
                goto err;
 
-       if (!debugfs_create_x32("fw_version", S_IRUGO, root,
-                               &dsp->fw_id_version))
+       if (!debugfs_create_x32("fw_version", 0444, root, &dsp->fw_id_version))
                goto err;
 
        for (i = 0; i < ARRAY_SIZE(wm_adsp_debugfs_fops); ++i) {
                if (!debugfs_create_file(wm_adsp_debugfs_fops[i].name,
-                                        S_IRUGO, root, dsp,
+                                        0444, root, dsp,
                                         &wm_adsp_debugfs_fops[i].fops))
                        goto err;
        }
index 7aac63e..0ff469c 100644 (file)
@@ -146,7 +146,7 @@ int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev)
        if (!ssi_dbg->dbg_dir)
                return -ENOMEM;
 
-       ssi_dbg->dbg_stats = debugfs_create_file("stats", S_IRUGO,
+       ssi_dbg->dbg_stats = debugfs_create_file("stats", 0444,
                                                 ssi_dbg->dbg_dir, ssi_dbg,
                                                 &fsl_ssi_stats_ops);
        if (!ssi_dbg->dbg_stats) {
index b4efb22..40ad000 100644 (file)
@@ -413,7 +413,7 @@ int register_sound_special_device(const struct file_operations *fops, int unit,
                break;
        }
        return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit,
-                                name, S_IRUSR | S_IWUSR, dev);
+                                name, 0600, dev);
 }
  
 EXPORT_SYMBOL(register_sound_special_device);
@@ -440,7 +440,7 @@ EXPORT_SYMBOL(register_sound_special);
 int register_sound_mixer(const struct file_operations *fops, int dev)
 {
        return sound_insert_unit(&chains[0], fops, dev, 0, 128,
-                                "mixer", S_IRUSR | S_IWUSR, NULL);
+                                "mixer", 0600, NULL);
 }
 
 EXPORT_SYMBOL(register_sound_mixer);
@@ -468,7 +468,7 @@ EXPORT_SYMBOL(register_sound_mixer);
 int register_sound_dsp(const struct file_operations *fops, int dev)
 {
        return sound_insert_unit(&chains[3], fops, dev, 3, 131,
-                                "dsp", S_IWUSR | S_IRUSR, NULL);
+                                "dsp", 0600, NULL);
 }
 
 EXPORT_SYMBOL(register_sound_dsp);
index f0e7135..7609ece 100644 (file)
@@ -2518,7 +2518,7 @@ static void snd_dbri_proc(struct snd_card *card)
 #ifdef DBRI_DEBUG
        if (!snd_card_proc_new(card, "debug", &entry)) {
                snd_info_set_text_ops(entry, dbri, dbri_debug_read);
-               entry->mode = S_IFREG | S_IRUGO;        /* Readable only. */
+               entry->mode = S_IFREG | 0444;   /* Readable only. */
        }
 #endif
 }