[PATCH 0443/1285] Replace numeric parameter like 0444 with macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu <chuansheng.liu@xxxxxxxxx>
Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx>
---
 drivers/media/pci/bt8xx/bttv-cards.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c
index 8a17cc0..a84caf4 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -109,21 +109,21 @@ static unsigned int audioall = UNSET;
 static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
 
 /* insmod options */
-module_param(triton1,    int, 0444);
-module_param(vsfx,       int, 0444);
-module_param(no_overlay, int, 0444);
-module_param(latency,    int, 0444);
-module_param(gpiomask,   int, 0444);
-module_param(audioall,   int, 0444);
-module_param(autoload,   int, 0444);
-
-module_param_array(card,     int, NULL, 0444);
-module_param_array(pll,      int, NULL, 0444);
-module_param_array(tuner,    int, NULL, 0444);
-module_param_array(svhs,     int, NULL, 0444);
-module_param_array(remote,   int, NULL, 0444);
-module_param_array(audiodev, int, NULL, 0444);
-module_param_array(audiomux, int, NULL, 0444);
+module_param(triton1,    int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(vsfx,       int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(no_overlay, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(latency,    int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(gpiomask,   int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(audioall,   int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(autoload,   int, S_IRUSR | S_IRGRP | S_IROTH);
+
+module_param_array(card,     int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(pll,      int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(tuner,    int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(svhs,     int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(remote,   int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(audiodev, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(audiomux, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
 
 MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
 		 "[enable bug compatibility for triton1 + others]");
-- 
2.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux