From patchwork Wed Jul 12 05:49:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 787011 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3x6p2752TRz9sRV for ; Wed, 12 Jul 2017 15:50:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DC6T9VEw"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751239AbdGLFuH (ORCPT ); Wed, 12 Jul 2017 01:50:07 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34583 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756689AbdGLFuG (ORCPT ); Wed, 12 Jul 2017 01:50:06 -0400 Received: by mail-wr0-f195.google.com with SMTP id k67so3202360wrc.1 for ; Tue, 11 Jul 2017 22:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=rYlDK3VaCNJvCkU173IhQ9qX4KRsaNz62s3Nj5fS/3s=; b=DC6T9VEwzPsAiArpzekv5AOqxLciDdjLJ2ib/WoEgT4w8+vqV+3ju84LYKEdndeq2W RtKgVaLj60rqpa4BbJFB6mw7ff2eH1PYs7GkO5vgzfCb42xsYvSS4D3SW8n7SD//CPWD anaio6eFRxA7WvAvOy0byNC1hu0+jFG7my2yj9xTcIFIJ6JGUyuJMpRrbAXNPwwbv8MB dIAoBmevaL7nyXFBxSEVOMno5TmGqP26fCKxhRITovNXe4TTQR83pQyj25g8VREcDuHs vlgs63fj0t6Fu/xbE6m+yeBpRzdfTj/NwCtozAzSmLlCb7kKFRPwpcP28ZYbU9Z9wBZ4 YyOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=rYlDK3VaCNJvCkU173IhQ9qX4KRsaNz62s3Nj5fS/3s=; b=XoIYEv7+B7KHNdQ695wyKjLR+eTvrvJxVJvVstVTTN+sjLJZeDks2m/WT5F2DnNHjX AH4nsjgqGPLixiIJ6wS2hYsBnr5zgKkK9CyF1IFapYEJm2m4UE4hqffhQS6ukqxPdVuX kqLFgyHBnS8aOV0qF6tD2J64H7g7nT+fMo0ukf7zm/PS2sGo4/KMPI6ppZYi0eviwi7J zXK1XvqM8xWTWWstIhpSDhZfDx0etuFGT6ynMJxFp4Sj/7FwDZvu8HJTXgTo0P3a/rQ5 wYDhWVDVH2SlFAXZRexk9v08mFgnTpS3G+/yP1QbwDOMHo+9xDecuppuR2STWpvy5g3j PQqg== X-Gm-Message-State: AIVw113clUpNAONkKRJlM2jReeMoJodudaQDbzrTA/ITu+iPfDVDsYFE QSuQgl50VfMcYuN2 X-Received: by 10.28.91.141 with SMTP id p135mr1150066wmb.19.1499838605266; Tue, 11 Jul 2017 22:50:05 -0700 (PDT) Received: from ?IPv6:2003:c6:ebc1:e200:4:ce91:c82d:34f2? (p200300C6EBC1E2000004CE91C82D34F2.dip0.t-ipconnect.de. [2003:c6:ebc1:e200:4:ce91:c82d:34f2]) by smtp.googlemail.com with ESMTPSA id q70sm1273797wrb.3.2017.07.11.22.50.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 22:50:04 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 4/9] rtc: ds1307: constify struct chip_desc variables To: Alexandre Belloni Cc: linux-rtc@vger.kernel.org References: Message-ID: <49e8545e-e1a1-3465-5640-822a4658ed11@gmail.com> Date: Wed, 12 Jul 2017 07:49:33 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org Constify struct chip_desc variables. Signed-off-by: Heiner Kallweit --- drivers/rtc/rtc-ds1307.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index d7158c9d..115fe1c5 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -147,7 +147,7 @@ struct chip_desc { static u8 do_trickle_setup_ds1339(struct ds1307 *, uint32_t ohms, bool diode); -static struct chip_desc chips[last_ds_type] = { +static const struct chip_desc chips[last_ds_type] = { [ds_1307] = { .nvram_offset = 8, .nvram_size = 56, @@ -941,7 +941,7 @@ static u8 do_trickle_setup_ds1339(struct ds1307 *ds1307, } static u8 ds1307_trickle_init(struct ds1307 *ds1307, - struct chip_desc *chip) + const struct chip_desc *chip) { uint32_t ohms; bool diode = true; @@ -1311,7 +1311,7 @@ static int ds1307_probe(struct i2c_client *client, struct ds1307 *ds1307; int err = -ENODEV; int tmp, wday; - struct chip_desc *chip; + const struct chip_desc *chip; bool want_irq = false; bool ds1307_can_wakeup_device = false; unsigned char *buf;