From patchwork Mon Nov 16 19:52:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 7630491 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A151E9F443 for ; Mon, 16 Nov 2015 19:54:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B441F204CF for ; Mon, 16 Nov 2015 19:54:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD92F205B6 for ; Mon, 16 Nov 2015 19:54:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752510AbbKPTyM (ORCPT ); Mon, 16 Nov 2015 14:54:12 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:37022 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbbKPTyH (ORCPT ); Mon, 16 Nov 2015 14:54:07 -0500 Received: by wmww144 with SMTP id w144so135108721wmw.0 for ; Mon, 16 Nov 2015 11:54:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=LrTa31nig1SluktnmCD5wtmQMoEaSFZik9eIuosOubE=; b=beN5rGfcK7f8vMIiCJYdXl8VqK9DEKSzJ8plf91XKVzrEDl1zDVb40iCQdjUekD+gV 70oJz9oxr3qot+bkrscVZ0Z4/dSmJN+sqLm9flEPPBN0hK7Mu6sYVuopgxAxTsON1f8k kwUoSqyJfJVcK4aevZf+Qqd0ned9/YB91U1oqHOUuD5KyAW7BP3V42PcQywFjZSDMCLC kThFDrBfAqIKN01tehXxeUohYqbKwggXnl1ayCNzMdQAyf+ZCAG5XAamp1/0KtzjYxIk G35I2KcU5upJtGqlTuW813sHJ8tVpvw06yFPtHLWA16MOaPn3xLqCZWXFUztcVccnku3 WF6A== X-Received: by 10.28.222.4 with SMTP id v4mr22392951wmg.67.1447703646722; Mon, 16 Nov 2015 11:54:06 -0800 (PST) Received: from ?IPv6:2003:62:5f55:ba00:2914:ea82:f3d7:fe39? (p200300625F55BA002914EA82F3D7FE39.dip0.t-ipconnect.de. [2003:62:5f55:ba00:2914:ea82:f3d7:fe39]) by smtp.googlemail.com with ESMTPSA id uz5sm4057326wjc.8.2015.11.16.11.54.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2015 11:54:06 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 4/8] media: rc: load decoder modules on-demand To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, =?UTF-8?Q?David_H=c3=a4rdeman?= Message-ID: <564A33FA.5050407@gmail.com> Date: Mon, 16 Nov 2015 20:52:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove code for unconditional decoder module loading (except lirc). Signed-off-by: Heiner Kallweit --- drivers/media/rc/rc-core-priv.h | 64 ----------------------------------------- drivers/media/rc/rc-ir-raw.c | 10 ------- 2 files changed, 74 deletions(-) diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h index b68d4f7..071651a 100644 --- a/drivers/media/rc/rc-core-priv.h +++ b/drivers/media/rc/rc-core-priv.h @@ -167,62 +167,6 @@ void ir_raw_init(void); * loads the compiled decoders for their usage with IR raw events */ -/* from ir-nec-decoder.c */ -#ifdef CONFIG_IR_NEC_DECODER_MODULE -#define load_nec_decode() request_module_nowait("ir-nec-decoder") -#else -static inline void load_nec_decode(void) { } -#endif - -/* from ir-rc5-decoder.c */ -#ifdef CONFIG_IR_RC5_DECODER_MODULE -#define load_rc5_decode() request_module_nowait("ir-rc5-decoder") -#else -static inline void load_rc5_decode(void) { } -#endif - -/* from ir-rc6-decoder.c */ -#ifdef CONFIG_IR_RC6_DECODER_MODULE -#define load_rc6_decode() request_module_nowait("ir-rc6-decoder") -#else -static inline void load_rc6_decode(void) { } -#endif - -/* from ir-jvc-decoder.c */ -#ifdef CONFIG_IR_JVC_DECODER_MODULE -#define load_jvc_decode() request_module_nowait("ir-jvc-decoder") -#else -static inline void load_jvc_decode(void) { } -#endif - -/* from ir-sony-decoder.c */ -#ifdef CONFIG_IR_SONY_DECODER_MODULE -#define load_sony_decode() request_module_nowait("ir-sony-decoder") -#else -static inline void load_sony_decode(void) { } -#endif - -/* from ir-sanyo-decoder.c */ -#ifdef CONFIG_IR_SANYO_DECODER_MODULE -#define load_sanyo_decode() request_module_nowait("ir-sanyo-decoder") -#else -static inline void load_sanyo_decode(void) { } -#endif - -/* from ir-sharp-decoder.c */ -#ifdef CONFIG_IR_SHARP_DECODER_MODULE -#define load_sharp_decode() request_module_nowait("ir-sharp-decoder") -#else -static inline void load_sharp_decode(void) { } -#endif - -/* from ir-mce_kbd-decoder.c */ -#ifdef CONFIG_IR_MCE_KBD_DECODER_MODULE -#define load_mce_kbd_decode() request_module_nowait("ir-mce_kbd-decoder") -#else -static inline void load_mce_kbd_decode(void) { } -#endif - /* from ir-lirc-codec.c */ #ifdef CONFIG_IR_LIRC_CODEC_MODULE #define load_lirc_codec() request_module_nowait("ir-lirc-codec") @@ -230,12 +174,4 @@ static inline void load_mce_kbd_decode(void) { } static inline void load_lirc_codec(void) { } #endif -/* from ir-xmp-decoder.c */ -#ifdef CONFIG_IR_XMP_DECODER_MODULE -#define load_xmp_decode() request_module_nowait("ir-xmp-decoder") -#else -static inline void load_xmp_decode(void) { } -#endif - - #endif /* _RC_CORE_PRIV */ diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c index 5cfb61f..763f8a8 100644 --- a/drivers/media/rc/rc-ir-raw.c +++ b/drivers/media/rc/rc-ir-raw.c @@ -362,17 +362,7 @@ EXPORT_SYMBOL(ir_raw_handler_unregister); void ir_raw_init(void) { /* Load the decoder modules */ - - load_nec_decode(); - load_rc5_decode(); - load_rc6_decode(); - load_jvc_decode(); - load_sony_decode(); - load_sanyo_decode(); - load_sharp_decode(); - load_mce_kbd_decode(); load_lirc_codec(); - load_xmp_decode(); /* If needed, we may later add some init code. In this case, it is needed to change the CONFIG_MODULE test at rc-core.h