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

[media] media: rc: load decoder modules on-demand

Remove code for unconditional decoder module loading (except lirc).

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Heiner Kallweit and committed by
Mauro Carvalho Chehab
acc1c3c6 53df8777

-74
-64
drivers/media/rc/rc-core-priv.h
··· 167 167 * loads the compiled decoders for their usage with IR raw events 168 168 */ 169 169 170 - /* from ir-nec-decoder.c */ 171 - #ifdef CONFIG_IR_NEC_DECODER_MODULE 172 - #define load_nec_decode() request_module_nowait("ir-nec-decoder") 173 - #else 174 - static inline void load_nec_decode(void) { } 175 - #endif 176 - 177 - /* from ir-rc5-decoder.c */ 178 - #ifdef CONFIG_IR_RC5_DECODER_MODULE 179 - #define load_rc5_decode() request_module_nowait("ir-rc5-decoder") 180 - #else 181 - static inline void load_rc5_decode(void) { } 182 - #endif 183 - 184 - /* from ir-rc6-decoder.c */ 185 - #ifdef CONFIG_IR_RC6_DECODER_MODULE 186 - #define load_rc6_decode() request_module_nowait("ir-rc6-decoder") 187 - #else 188 - static inline void load_rc6_decode(void) { } 189 - #endif 190 - 191 - /* from ir-jvc-decoder.c */ 192 - #ifdef CONFIG_IR_JVC_DECODER_MODULE 193 - #define load_jvc_decode() request_module_nowait("ir-jvc-decoder") 194 - #else 195 - static inline void load_jvc_decode(void) { } 196 - #endif 197 - 198 - /* from ir-sony-decoder.c */ 199 - #ifdef CONFIG_IR_SONY_DECODER_MODULE 200 - #define load_sony_decode() request_module_nowait("ir-sony-decoder") 201 - #else 202 - static inline void load_sony_decode(void) { } 203 - #endif 204 - 205 - /* from ir-sanyo-decoder.c */ 206 - #ifdef CONFIG_IR_SANYO_DECODER_MODULE 207 - #define load_sanyo_decode() request_module_nowait("ir-sanyo-decoder") 208 - #else 209 - static inline void load_sanyo_decode(void) { } 210 - #endif 211 - 212 - /* from ir-sharp-decoder.c */ 213 - #ifdef CONFIG_IR_SHARP_DECODER_MODULE 214 - #define load_sharp_decode() request_module_nowait("ir-sharp-decoder") 215 - #else 216 - static inline void load_sharp_decode(void) { } 217 - #endif 218 - 219 - /* from ir-mce_kbd-decoder.c */ 220 - #ifdef CONFIG_IR_MCE_KBD_DECODER_MODULE 221 - #define load_mce_kbd_decode() request_module_nowait("ir-mce_kbd-decoder") 222 - #else 223 - static inline void load_mce_kbd_decode(void) { } 224 - #endif 225 - 226 170 /* from ir-lirc-codec.c */ 227 171 #ifdef CONFIG_IR_LIRC_CODEC_MODULE 228 172 #define load_lirc_codec() request_module_nowait("ir-lirc-codec") 229 173 #else 230 174 static inline void load_lirc_codec(void) { } 231 175 #endif 232 - 233 - /* from ir-xmp-decoder.c */ 234 - #ifdef CONFIG_IR_XMP_DECODER_MODULE 235 - #define load_xmp_decode() request_module_nowait("ir-xmp-decoder") 236 - #else 237 - static inline void load_xmp_decode(void) { } 238 - #endif 239 - 240 176 241 177 #endif /* _RC_CORE_PRIV */
-10
drivers/media/rc/rc-ir-raw.c
··· 362 362 void ir_raw_init(void) 363 363 { 364 364 /* Load the decoder modules */ 365 - 366 - load_nec_decode(); 367 - load_rc5_decode(); 368 - load_rc6_decode(); 369 - load_jvc_decode(); 370 - load_sony_decode(); 371 - load_sanyo_decode(); 372 - load_sharp_decode(); 373 - load_mce_kbd_decode(); 374 365 load_lirc_codec(); 375 - load_xmp_decode(); 376 366 377 367 /* If needed, we may later add some init code. In this case, 378 368 it is needed to change the CONFIG_MODULE test at rc-core.h