From patchwork Wed Sep 10 20:05:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 387962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wi0-x238.google.com (mail-wi0-x238.google.com [IPv6:2a00:1450:400c:c05::238]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1A958140085 for ; Thu, 11 Sep 2014 06:05:49 +1000 (EST) Received: by mail-wi0-f184.google.com with SMTP id em10sf299136wid.1 for ; Wed, 10 Sep 2014 13:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-transfer-encoding; bh=kyw8nqZijNTUtnIW3GeGCsCPUic7qseLLO9ksk7dcXo=; b=TnA07+X6Xq6PyWitln6Bv4JK0bsw52pdkOMIJg7+uWFqCMu0VThylwr/90YPL1Ks2c ZiQL037UfUYtK0Emni60fNXecD9qZH29mI3dXn+0jaKDSpbcmfYMZBnnA3z50dlxtcEG iZK2I4P5ITgdyWfaD1laDISELwWPUCUgv/YesWQSYkKwvI01RXoi/To5lmFg9gbiPe3L crSF3LoYxg9scCPSp3dQfPvuIHE7zYmQMbmsJqI5Uc4Tg+irDiJqf9LfFO8goWzIU2ZM OdHsTrV+gM+xjrqpPRwwcuZxuRu46PgBhQjZFbZyCHSSd9PjGaB+Ttbv6TefjPFCzZxe liVQ== X-Received: by 10.152.116.104 with SMTP id jv8mr27950lab.34.1410379546201; Wed, 10 Sep 2014 13:05:46 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.152.25.134 with SMTP id c6ls560235lag.37.gmail; Wed, 10 Sep 2014 13:05:44 -0700 (PDT) X-Received: by 10.152.21.137 with SMTP id v9mr779886lae.1.1410379544965; Wed, 10 Sep 2014 13:05:44 -0700 (PDT) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de. [2001:6f8:1178:4:290:27ff:fe1d:cc33]) by gmr-mx.google.com with ESMTPS id pw5si694769lbb.0.2014.09.10.13.05.44 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Sep 2014 13:05:44 -0700 (PDT) Received-SPF: none (google.com: ukl@pengutronix.de does not designate permitted sender hosts) client-ip=2001:6f8:1178:4:290:27ff:fe1d:cc33; Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XRo96-0000FS-Lq; Wed, 10 Sep 2014 22:05:40 +0200 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.84) (envelope-from ) id 1XRo95-00037a-5n; Wed, 10 Sep 2014 22:05:39 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Alessandro Zummo , Andrew Morton Cc: rtc-linux@googlegroups.com, kernel@pengutronix.de Subject: [rtc-linux] [PATCH] rtc: make of_device_ids const Date: Wed, 10 Sep 2014 22:05:34 +0200 Message-Id: <1410379534-11526-1-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: rtc-linux@googlegroups.com X-Original-Sender: u.kleine-koenig@pengutronix.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: ukl@pengutronix.de does not designate permitted sender hosts) smtp.mail=ukl@pengutronix.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , of_device_ids (i.e. compatible strings and the respective data) are not supposed to change at runtime. All functions working with of_device_ids provided by work with const of_device_ids. This allows to mark all struct of_device_id below drivers/rtc const, too. Signed-off-by: Uwe Kleine-König --- drivers/rtc/rtc-isl12022.c | 2 +- drivers/rtc/rtc-mpc5121.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c index aa55f081c505..ee3ba7e6b45e 100644 --- a/drivers/rtc/rtc-isl12022.c +++ b/drivers/rtc/rtc-isl12022.c @@ -274,7 +274,7 @@ static int isl12022_probe(struct i2c_client *client, } #ifdef CONFIG_OF -static struct of_device_id isl12022_dt_match[] = { +static const struct of_device_id isl12022_dt_match[] = { { .compatible = "isl,isl12022" }, { }, }; diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index dc4f14255cc3..3b965ad6f4d5 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c @@ -401,7 +401,7 @@ static int mpc5121_rtc_remove(struct platform_device *op) } #ifdef CONFIG_OF -static struct of_device_id mpc5121_rtc_match[] = { +static const struct of_device_id mpc5121_rtc_match[] = { { .compatible = "fsl,mpc5121-rtc", }, { .compatible = "fsl,mpc5200-rtc", }, {},