Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a73cf46 authored by Joe Perches's avatar Joe Perches Committed by Takashi Iwai
Browse files

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: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 84eaaef2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading