From patchwork Mon Dec 10 00:45:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 1854981 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 17D644006E for ; Mon, 10 Dec 2012 00:46:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753767Ab2LJAq0 (ORCPT ); Sun, 9 Dec 2012 19:46:26 -0500 Received: from mail.kapsi.fi ([217.30.184.167]:57679 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753496Ab2LJAqW (ORCPT ); Sun, 9 Dec 2012 19:46:22 -0500 Received: from dyn3-82-128-185-21.psoas.suomi.net ([82.128.185.21] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1ThrVl-0002n4-8H; Mon, 10 Dec 2012 02:46:21 +0200 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari Subject: [PATCH RFC 10/11] dvb_usb_v2: use dummy function defines instead stub functions Date: Mon, 10 Dec 2012 02:45:34 +0200 Message-Id: <1355100335-2123-10-git-send-email-crope@iki.fi> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1355100335-2123-1-git-send-email-crope@iki.fi> References: <1355100335-2123-1-git-send-email-crope@iki.fi> X-SA-Exim-Connect-IP: 82.128.185.21 X-SA-Exim-Mail-From: crope@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org I think it is better (cheaper) to use dummy defines for functions that has no meaning when remote controller is disabled by Kconfig. Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 94f134c..1330c64 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -204,15 +204,8 @@ static int dvb_usbv2_remote_exit(struct dvb_usb_device *d) return 0; } #else -static int dvb_usbv2_remote_init(struct dvb_usb_device *d) -{ - return 0; -} - -static int dvb_usbv2_remote_exit(struct dvb_usb_device *d) -{ - return 0; -} + #define dvb_usbv2_remote_init(args...) 0 + #define dvb_usbv2_remote_exit(args...) #endif static void dvb_usb_data_complete(struct usb_data_stream *stream, u8 *buf,