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

usb: gadget:audio: Replace deprecated macro S_IRUGO

Use octal digits as suggested by checkpatch instead of the deprecated
macro.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-2-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Pavel Hofman and committed by
Greg Kroah-Hartman
ce6a7bfb 89ada0fe

+18 -18
+18 -18
drivers/usb/gadget/legacy/audio.c
··· 22 22 23 23 /* Playback(USB-IN) Default Stereo - Fl/Fr */ 24 24 static int p_chmask = UAC2_DEF_PCHMASK; 25 - module_param(p_chmask, uint, S_IRUGO); 25 + module_param(p_chmask, uint, 0444); 26 26 MODULE_PARM_DESC(p_chmask, "Playback Channel Mask"); 27 27 28 28 /* Playback Default 48 KHz */ 29 29 static int p_srate = UAC2_DEF_PSRATE; 30 - module_param(p_srate, uint, S_IRUGO); 30 + module_param(p_srate, uint, 0444); 31 31 MODULE_PARM_DESC(p_srate, "Playback Sampling Rate"); 32 32 33 33 /* Playback Default 16bits/sample */ 34 34 static int p_ssize = UAC2_DEF_PSSIZE; 35 - module_param(p_ssize, uint, S_IRUGO); 35 + module_param(p_ssize, uint, 0444); 36 36 MODULE_PARM_DESC(p_ssize, "Playback Sample Size(bytes)"); 37 37 38 38 /* Capture(USB-OUT) Default Stereo - Fl/Fr */ 39 39 static int c_chmask = UAC2_DEF_CCHMASK; 40 - module_param(c_chmask, uint, S_IRUGO); 40 + module_param(c_chmask, uint, 0444); 41 41 MODULE_PARM_DESC(c_chmask, "Capture Channel Mask"); 42 42 43 43 /* Capture Default 64 KHz */ 44 44 static int c_srate = UAC2_DEF_CSRATE; 45 - module_param(c_srate, uint, S_IRUGO); 45 + module_param(c_srate, uint, 0444); 46 46 MODULE_PARM_DESC(c_srate, "Capture Sampling Rate"); 47 47 48 48 /* Capture Default 16bits/sample */ 49 49 static int c_ssize = UAC2_DEF_CSSIZE; 50 - module_param(c_ssize, uint, S_IRUGO); 50 + module_param(c_ssize, uint, 0444); 51 51 MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)"); 52 52 #else 53 53 #ifndef CONFIG_GADGET_UAC1_LEGACY ··· 55 55 56 56 /* Playback(USB-IN) Default Stereo - Fl/Fr */ 57 57 static int p_chmask = UAC1_DEF_PCHMASK; 58 - module_param(p_chmask, uint, S_IRUGO); 58 + module_param(p_chmask, uint, 0444); 59 59 MODULE_PARM_DESC(p_chmask, "Playback Channel Mask"); 60 60 61 61 /* Playback Default 48 KHz */ 62 62 static int p_srate = UAC1_DEF_PSRATE; 63 - module_param(p_srate, uint, S_IRUGO); 63 + module_param(p_srate, uint, 0444); 64 64 MODULE_PARM_DESC(p_srate, "Playback Sampling Rate"); 65 65 66 66 /* Playback Default 16bits/sample */ 67 67 static int p_ssize = UAC1_DEF_PSSIZE; 68 - module_param(p_ssize, uint, S_IRUGO); 68 + module_param(p_ssize, uint, 0444); 69 69 MODULE_PARM_DESC(p_ssize, "Playback Sample Size(bytes)"); 70 70 71 71 /* Capture(USB-OUT) Default Stereo - Fl/Fr */ 72 72 static int c_chmask = UAC1_DEF_CCHMASK; 73 - module_param(c_chmask, uint, S_IRUGO); 73 + module_param(c_chmask, uint, 0444); 74 74 MODULE_PARM_DESC(c_chmask, "Capture Channel Mask"); 75 75 76 76 /* Capture Default 48 KHz */ 77 77 static int c_srate = UAC1_DEF_CSRATE; 78 - module_param(c_srate, uint, S_IRUGO); 78 + module_param(c_srate, uint, 0444); 79 79 MODULE_PARM_DESC(c_srate, "Capture Sampling Rate"); 80 80 81 81 /* Capture Default 16bits/sample */ 82 82 static int c_ssize = UAC1_DEF_CSSIZE; 83 - module_param(c_ssize, uint, S_IRUGO); 83 + module_param(c_ssize, uint, 0444); 84 84 MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)"); 85 85 #else /* CONFIG_GADGET_UAC1_LEGACY */ 86 86 #include "u_uac1_legacy.h" 87 87 88 88 static char *fn_play = FILE_PCM_PLAYBACK; 89 - module_param(fn_play, charp, S_IRUGO); 89 + module_param(fn_play, charp, 0444); 90 90 MODULE_PARM_DESC(fn_play, "Playback PCM device file name"); 91 91 92 92 static char *fn_cap = FILE_PCM_CAPTURE; 93 - module_param(fn_cap, charp, S_IRUGO); 93 + module_param(fn_cap, charp, 0444); 94 94 MODULE_PARM_DESC(fn_cap, "Capture PCM device file name"); 95 95 96 96 static char *fn_cntl = FILE_CONTROL; 97 - module_param(fn_cntl, charp, S_IRUGO); 97 + module_param(fn_cntl, charp, 0444); 98 98 MODULE_PARM_DESC(fn_cntl, "Control device file name"); 99 99 100 100 static int req_buf_size = UAC1_OUT_EP_MAX_PACKET_SIZE; 101 - module_param(req_buf_size, int, S_IRUGO); 101 + module_param(req_buf_size, int, 0444); 102 102 MODULE_PARM_DESC(req_buf_size, "ISO OUT endpoint request buffer size"); 103 103 104 104 static int req_count = UAC1_REQ_COUNT; 105 - module_param(req_count, int, S_IRUGO); 105 + module_param(req_count, int, 0444); 106 106 MODULE_PARM_DESC(req_count, "ISO OUT endpoint request count"); 107 107 108 108 static int audio_buf_size = UAC1_AUDIO_BUF_SIZE; 109 - module_param(audio_buf_size, int, S_IRUGO); 109 + module_param(audio_buf_size, int, 0444); 110 110 MODULE_PARM_DESC(audio_buf_size, "Audio buffer size"); 111 111 #endif /* CONFIG_GADGET_UAC1_LEGACY */ 112 112 #endif