From patchwork Wed Feb 5 16:42:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3586961 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 83DC49F392 for ; Wed, 5 Feb 2014 16:42:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B06C420154 for ; Wed, 5 Feb 2014 16:42:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2D0B200F3 for ; Wed, 5 Feb 2014 16:42:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753217AbaBEQmG (ORCPT ); Wed, 5 Feb 2014 11:42:06 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:59508 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753193AbaBEQl7 (ORCPT ); Wed, 5 Feb 2014 11:41:59 -0500 Received: from avalon.ideasonboard.com (247.229-240-81.adsl-dyn.isp.belgacom.be [81.240.229.247]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 05E473672E; Wed, 5 Feb 2014 17:40:52 +0100 (CET) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Hans Verkuil , Lars-Peter Clausen Subject: [PATCH 30/47] adv7604: Don't put info string arrays on the stack Date: Wed, 5 Feb 2014 17:42:21 +0100 Message-Id: <1391618558-5580-31-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1391618558-5580-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1391618558-5580-1-git-send-email-laurent.pinchart@ideasonboard.com> 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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 From: Lars-Peter Clausen We do not want to modify the info string arrays ever, so no need to waste stack space for them. While we are at it also make them const. Signed-off-by: Lars-Peter Clausen Signed-off-by: Laurent Pinchart --- drivers/media/i2c/adv7604.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 98ac383..cfcbb6d 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -1886,13 +1886,13 @@ static int adv7604_log_status(struct v4l2_subdev *sd) struct stdi_readback stdi; u8 reg_io_0x02 = io_read(sd, 0x02); - char *csc_coeff_sel_rb[16] = { + static const char * const csc_coeff_sel_rb[16] = { "bypassed", "YPbPr601 -> RGB", "reserved", "YPbPr709 -> RGB", "reserved", "RGB -> YPbPr601", "reserved", "RGB -> YPbPr709", "reserved", "YPbPr709 -> YPbPr601", "YPbPr601 -> YPbPr709", "reserved", "reserved", "reserved", "reserved", "manual" }; - char *input_color_space_txt[16] = { + static const char * const input_color_space_txt[16] = { "RGB limited range (16-235)", "RGB full range (0-255)", "YCbCr Bt.601 (16-235)", "YCbCr Bt.709 (16-235)", "xvYCC Bt.601", "xvYCC Bt.709", @@ -1900,12 +1900,12 @@ static int adv7604_log_status(struct v4l2_subdev *sd) "invalid", "invalid", "invalid", "invalid", "invalid", "invalid", "invalid", "automatic" }; - char *rgb_quantization_range_txt[] = { + static const char * const rgb_quantization_range_txt[] = { "Automatic", "RGB limited range (16-235)", "RGB full range (0-255)", }; - char *deep_color_mode_txt[4] = { + static const char * const deep_color_mode_txt[4] = { "8-bits per channel", "10-bits per channel", "12-bits per channel",