From patchwork Tue Apr 8 15:21:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime COQUELIN X-Patchwork-Id: 28016 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1961A20447 for ; Tue, 8 Apr 2014 15:23:49 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id il7sf3050124vcb.5 for ; Tue, 08 Apr 2014 08:23:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Yf1I/QMgBgNQs7Jct3OC5CJg8dfsTvRmhxIGvkFd+HI=; b=DfITcn1Q8A9AnQUs7vxMduZYobp6AP3j3QLZIW3yRB+fRm+ouonxhZWS/Qv2Vdmean 1HE62PcPq+qI/X4dy0EYY4qYxk9Y39PkQ0m43XGPXwOJLhDpUhq2c2VOEgeDteGcM6cF iAlJdP3FFTUOR8UuKCwTAw9MO4Yd6d25A+ink89WG1hd68e29H2qopi/2Iz1a1dzHUHh 89WuMWoKG5BDKVal9+3m0H0LkTR+/24veX1Ci+STuZWn/9OC9mfbhIA3jHAzc3EJw51T 3d4WRuh4D0CN2D7R0lJe8PZzv0LfagPwnjs0si18nZDSIjR6HIhO4absjjCRMKAqFS6Z pyrg== X-Gm-Message-State: ALoCoQlcpjMuHJaXOon1dwKKYHBFmfQyPhZweL1H7+tmbvUk/ROZf958hKKzsLbO0SkS+jrLtGra X-Received: by 10.58.94.232 with SMTP id df8mr1690995veb.23.1396970628833; Tue, 08 Apr 2014 08:23:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.18.241 with SMTP id 104ls239625qgf.24.gmail; Tue, 08 Apr 2014 08:23:48 -0700 (PDT) X-Received: by 10.52.78.231 with SMTP id e7mr1904996vdx.28.1396970628674; Tue, 08 Apr 2014 08:23:48 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id v2si446772vet.196.2014.04.08.08.23.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 08:23:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jy13so932320veb.30 for ; Tue, 08 Apr 2014 08:23:48 -0700 (PDT) X-Received: by 10.52.241.106 with SMTP id wh10mr3155515vdc.16.1396970628578; Tue, 08 Apr 2014 08:23:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp254709vcv; Tue, 8 Apr 2014 08:23:47 -0700 (PDT) X-Received: by 10.68.245.162 with SMTP id xp2mr5425878pbc.69.1396970627289; Tue, 08 Apr 2014 08:23:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hw8si1255334pbc.77.2014.04.08.08.23.46; Tue, 08 Apr 2014 08:23:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932329AbaDHPXh (ORCPT + 27 others); Tue, 8 Apr 2014 11:23:37 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:58645 "EHLO mx08-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756704AbaDHPXe (ORCPT ); Tue, 8 Apr 2014 11:23:34 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.14.5/8.14.5) with SMTP id s38FJEc3024900; Tue, 8 Apr 2014 17:21:55 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 1k2ek3xhua-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 08 Apr 2014 17:21:55 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C1A0553; Tue, 8 Apr 2014 15:21:54 +0000 (GMT) Received: from mail7.sgp.st.com (unknown [164.129.223.81]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A0D532D508; Tue, 8 Apr 2014 15:21:54 +0000 (GMT) Received: from lmenx29l.st.com (lmenx29l.lme.st.com [10.201.23.80]) by mail7.sgp.st.com (MOS 4.3.3-GA) with ESMTP id BZB24826 (AUTH lme00137); Tue, 8 Apr 2014 17:21:53 +0200 From: Maxime COQUELIN To: Linus Walleij , Joe Perches , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@stlinux.com, maxime.coquelin@st.com Subject: [PATCH 1/2] pinctrl: st: Use const qualifier when required Date: Tue, 8 Apr 2014 17:21:48 +0200 Message-Id: <1396970509-28009-2-git-send-email-maxime.coquelin@st.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1396970509-28009-1-git-send-email-maxime.coquelin@st.com> References: <1396970509-28009-1-git-send-email-maxime.coquelin@st.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96, 1.0.14, 0.0.0000 definitions=2014-04-08_04:2014-04-08, 2014-04-08, 1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxime.coquelin@st.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds const qualifier where applicable. CC: Linus Walleij Reported-by: Joe Perches Signed-off-by: Maxime Coquelin --- drivers/pinctrl/pinctrl-st.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index bd725b0..868f10f 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -242,13 +242,13 @@ struct st_pio_control { }; struct st_pctl_data { - enum st_retime_style rt_style; - unsigned int *input_delays; - int ninput_delays; - unsigned int *output_delays; - int noutput_delays; + const enum st_retime_style rt_style; + const unsigned int *input_delays; + const int ninput_delays; + const unsigned int *output_delays; + const int noutput_delays; /* register offset information */ - int alt, oe, pu, od, rt; + const int alt, oe, pu, od, rt; }; struct st_pinconf { @@ -342,8 +342,8 @@ struct st_pinctrl { /* SOC specific data */ /* STiH415 data */ -static unsigned int stih415_input_delays[] = {0, 500, 1000, 1500}; -static unsigned int stih415_output_delays[] = {0, 1000, 2000, 3000}; +static const unsigned int stih415_input_delays[] = {0, 500, 1000, 1500}; +static const unsigned int stih415_output_delays[] = {0, 1000, 2000, 3000}; #define STIH415_PCTRL_COMMON_DATA \ .rt_style = st_retime_style_packed, \ @@ -378,8 +378,8 @@ static const struct st_pctl_data stih415_right_data = { }; /* STiH416 data */ -static unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250, 1500, - 1750, 2000, 2250, 2500, 2750, 3000, 3250 }; +static const unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250, + 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250 }; static const struct st_pctl_data stih416_data = { .rt_style = st_retime_style_dedicated, @@ -468,7 +468,7 @@ static void st_pctl_set_function(struct st_pio_control *pc, static unsigned long st_pinconf_delay_to_bit(unsigned int delay, const struct st_pctl_data *data, unsigned long config) { - unsigned int *delay_times; + const unsigned int *delay_times; int num_delay_times, i, closest_index = -1; unsigned int closest_divergence = UINT_MAX; @@ -501,7 +501,7 @@ static unsigned long st_pinconf_delay_to_bit(unsigned int delay, static unsigned long st_pinconf_bit_to_delay(unsigned int index, const struct st_pctl_data *data, unsigned long output) { - unsigned int *delay_times; + const unsigned int *delay_times; int num_delay_times; if (output) {