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 4563432badba56e37c670541bda344b6c805392b..4b01a37c836ea8be39c223f8ec551145d34f2b95 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 4b36767af9e15cef0b04d6308b9e8d7d57e68850..fe502bc5e6d20e8d800739bbca65a16b6085f155 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 79b4df1c1dc7e735a360e6d2425ca5d52d199f78..4849c611c0fe3a94d98aa3eef778f3da5538575f 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 379bf486ccc74c598c6fd220d1230f56714431c6..64d904bee8bb345edf6bc9053016f38027c51ccf 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 1980f68246cb84003a3ae29a6db61e951bf4ec54..905a53c1cde5aeb8a82918d9b44dd0e92d765956 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 66ac89aad68178592b9517a85de5bc092e55c70c..c352bfb973cc292e756dd351c2ad66604be68b56 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 ae33e456708c2871359acc796a6b31b05b47b201..4b5356a1031599afb2158f4f703dbdc1998d68cb 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 8fb9a54fe8ba879857ce61ec25d5d2408c9a21ad..9af154db530a803943c9dc420d06e5a180d0789f 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 f32e813422474320551b843f2cff708594930743..b68e71ca7abdaa248e7caac57d269556da14925b 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 cd2c07fa2ef4b9a8f74649d37bfc01ca836c738c..16b24091d79932bc6c21093a6259790dc3ef5e0e 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 ec8a94325ef628fe9a036ccaeccaa7ffc969d0c5..3cdf0a88d71bdc88aca36b0c4aae54ea5f661c4a 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 ec24f96794f50794737578c93d06261a9d93330c..8096891af9137a509e415cea4242a639a21c329b 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 faf8c854d256656a4f94c5c48f929849bb3698ff..bb870fc73f99f08ac34d4a921c88c8f26a63b4b7 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 a1d601f31165712623785f55dd1014a0ae1b586b..6996d5a6ff5f7ce61cb97a803a18313cd46bc3f9 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 69441d121f71b4662d6106e31304d081f14de2c5..40ccbfd8ef89af6b5753602471c16948fa83b0a5 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 9c21f31b8b21c9f05ceaabcf0ce49cc86eb46681..779ecec5af62abc8b4bad53bbecb1b07049e01d5 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 4edc064999ede2aa370d689313ec5c09056cdc88..ab6830a6d242f00048d3451549bb50b81f9e6fad 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 8ba4f9f262b87f3a302f696a544809cdfb6dc5ed..27dac071bc7394969c671c9406b93f917c498766 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 bfd4a4c06914aa6eb12554990423062ee9e2dc1a..fee3bf32a0daa2747b367f67fed759de3fa18507 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 45e561c425bfbdc02b89a090961b333facad898f..6c584d9b6c42b5558d5eb303f08d58ef414eb34a 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 6320bf084e476a48d1a0bac92542337f3173f411..e120a11c69e87866a0f19db45834cc73f680b22c 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 720361455c60166061aa7e1921d0de147d1c42ce..64e0961f93bacb19697c35108968a66d1c130572 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 b1a2a7ea4172331c07b50340c5d26ebe2f9e6bf0..7d049569012c105bdacfff9ac1f406c5e35ecc11 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 9b2b8b38122f5e476683a3c24bd077ac68c84ce4..a2c85cc37972306e60adb71abe0e53590c7cad1b 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 0020fd0efc466b46e4482a106d80c23d33546504..ed1251c5f449a9f2189745e03d6bfcc5e7eb61ba 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 aa61615288ff43089d3cb8ad9828a646da384900..c44eadef64ae20db5d31e0d00ed416b629fe4289 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 7488e1b7a770732cddd8ffc593359bb2d36ed93b..abb01ce669833455483977c0a28cd6d4b310b24d 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 08e874e9a7f6419a26728ff871cc2bdd86480e8f..2099e9ce441afdd2f58e96feb7895224964928cd 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 f2f32779de986ff9d50b6853f024113d79ef9752..b2874220be1b569b41d836907d90378a0ed03cd0 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 2c2b12a0617741a918384f77ea97bf8cfd868ee2..611589cbdad65d2ebf44ecaaaf6ea5c6c990a8a3 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 055227caa7cadb2c33f3087c10d9ede35d506da9..b5700803179211575cb57eff5dee71b7cf2f4fd2 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 7d7eb1354eeec4dc48a734251e6cb9f5d12cd850..8840daf9c6a300899efaf02898430d158d5b972a 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 5101f40f6fbdd099ec6c96c709e7b5d0195d4695..93b8cfc6636fc804cc4a395256c22d8dfedcf0f2 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 8dabd4d0211d69f7f12c2269d449fced0c250848..d7366ade5a25a55d38744e06dbdc70e45fdf6609 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 c241dc06dd92a82e392fe06bfc5cf17a14266994..904e3c4f4dfec25020276dd45577bb3fbebce4dc 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 f9ae72f28ddc4f5979bf532259933f146f54cfd4..e57da403623166a6c4c7a27c566a1fa2660a6599 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 feca0a672976c21ab60699895633629cfec699b3..80dc421971548295cff83066e7a003cbe450ccae 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 82b0927e6ed747a85977ce5c9232e7dba3c843ff..af062c4f4017ec55d6f72f7e2f8565e09bc7a989 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 7aac63e2c561d7372b4fa7dda30f4bddf0d62e16..0ff469c027dd60631c66840a3df458fb1ddf7ea6 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 b4efb22db5611f2d07eb840def3eeacb43e45844..40ad000c2e3ca88f1e028a6c0acf84094b05c1a2 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 f0e713527e91705cb54017e027f0a8a7f0e16e79..7609eceba1a2dc3b5adf1e145c8743be1327b918 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
 }