From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752118AbdBWFzT (ORCPT ); Thu, 23 Feb 2017 00:55:19 -0500 Received: from smtprelay0213.hostedemail.com ([216.40.44.213]:59717 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751957AbdBWFzS (ORCPT ); Thu, 23 Feb 2017 00:55:18 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1359:1437:1534:1542:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3353:3865:3866:4321:4605:5007:6119:6261:7903:10004:10848:11026:11473:11658:11914:12043:12296:12438:12555:12895:14096:14181:14394:14721:21080:30054,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: soap06_2cdb96b52f906 X-Filterd-Recvd-Size: 2969 From: Joe Perches To: Thomas Petazzoni , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: fbtft: Make the pointers to s16 init arrays const Date: Wed, 22 Feb 2017 21:54:56 -0800 Message-Id: <4314839e32c3cbeb57db32c5ee8ab6fbddf15a05.1487829232.git.joe@perches.com> X-Mailer: git-send-email 2.10.0.rc2.1.g053435c In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This allows making some of the actual arrays const. Signed-off-by: Joe Perches --- drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/fbtft/fbtft.h | 4 ++-- drivers/staging/fbtft/flexfb.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 7c8af29cdb75..fdef0b9e7cf3 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -659,7 +659,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, unsigned int bpp = display->bpp; unsigned int fps = display->fps; int vmem_size, i; - s16 *init_sequence = display->init_sequence; + const s16 *init_sequence = display->init_sequence; char *gamma = display->gamma; u32 *gamma_curves = NULL; diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h index 44cf94d160d4..119c3a72be1b 100644 --- a/drivers/staging/fbtft/fbtft.h +++ b/drivers/staging/fbtft/fbtft.h @@ -124,7 +124,7 @@ struct fbtft_display { unsigned int bpp; unsigned int fps; int txbuflen; - s16 *init_sequence; + const s16 *init_sequence; char *gamma; int gamma_num; int gamma_len; @@ -228,7 +228,7 @@ struct fbtft_par { int led[16]; int aux[16]; } gpio; - s16 *init_sequence; + const s16 *init_sequence; struct { struct mutex lock; u32 *curves; diff --git a/drivers/staging/fbtft/flexfb.c b/drivers/staging/fbtft/flexfb.c index af8422e18780..f749c057901f 100644 --- a/drivers/staging/fbtft/flexfb.c +++ b/drivers/staging/fbtft/flexfb.c @@ -63,7 +63,7 @@ static bool latched; module_param(latched, bool, 0000); MODULE_PARM_DESC(latched, "Use with latched 16-bit databus"); -static s16 *initp; +static const s16 *initp; static int initp_num; /* default init sequences */ @@ -390,7 +390,7 @@ struct flexfb_lcd_controller { unsigned int height; unsigned int setaddrwin; unsigned int regwidth; - s16 *init_seq; + const s16 *init_seq; int init_seq_sz; }; -- 2.10.0.rc2.1.g053435c