From patchwork Wed Mar 11 12:43:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 448971 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 EB42D140172 for ; Wed, 11 Mar 2015 23:43:43 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753472AbbCKMn3 (ORCPT ); Wed, 11 Mar 2015 08:43:29 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:38445 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752489AbbCKMn1 (ORCPT ); Wed, 11 Mar 2015 08:43:27 -0400 Received: by labhs14 with SMTP id hs14so7971488lab.5 for ; Wed, 11 Mar 2015 05:43:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=N2zUeOq4WbKFpo0x0cVk4rYXPqrrgnPcDKiP4DN2dZc=; b=DJBUti+VMWH5xU4ulC65y3upvdL79QS/brZZ4H/7bUocjXNP8m1Q1e3UbWUPuBYrjK YKtrjY7F/mTQACpj8/TnEtE6sHcn4XgWHTWHqXOj+72yVSIOs4Fgwfw24RdA5aXJrNhp Wopg7YiVa66NQfS6QuvM44X5oG6f/H/jh4INIcp3nJV/wH2T02UFogp+hhCoGQVgq3/G 3nki+UClTKrObsT2F0iqwz7exLstAz7CzLo40oJZ/jBq5dWenYcMPIDyMw0cp3OxRrK2 0z8etZlGE1JY8TIdCZ72Fa4HDMfpXvmlgXI0mWzYFvAi8VoufgEuTv6tUl3F1chtgir4 GEPQ== X-Gm-Message-State: ALoCoQnp+Uu5uAIQxIzK1GU0y4ZXxpwasJd4bLOjaILBlTKTGAnhopYQiCd77GP7qP5GTKmaBCp2 X-Received: by 10.112.131.66 with SMTP id ok2mr31545961lbb.51.1426077805917; Wed, 11 Mar 2015 05:43:25 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id w9sm702084laj.24.2015.03.11.05.43.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 05:43:24 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Olliver Schinagl , Rojhalat Ibrahim Subject: [PATCH v2] gpio: fix constconst in devres Date: Wed, 11 Mar 2015 13:43:19 +0100 Message-Id: <1426077799-26852-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Commit 1feb57a245a4910b03202a814ffc51a900bd4aca "gpio: add parameter to allow the use named gpios" includes a double-consted array. What we want is not const const * but const * const (const pointer to const data). Fix this. Reported-by: Dan Carpenter Cc: Olliver Schinagl Cc: Rojhalat Ibrahim Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Const pointer to const data is what we want. --- drivers/gpio/devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c index ec24da2418b3..07ba82317ece 100644 --- a/drivers/gpio/devres.c +++ b/drivers/gpio/devres.c @@ -135,7 +135,7 @@ struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, const char *con_id, struct fwnode_handle *child) { - static const char const *suffixes[] = { "gpios", "gpio" }; + static const char * const suffixes[] = { "gpios", "gpio" }; char prop_name[32]; /* 32 is max size of property name */ struct gpio_desc **dr; struct gpio_desc *desc;