From patchwork Mon Apr 27 12:54:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 464987 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 0FC7414007D for ; Mon, 27 Apr 2015 22:56:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=z/RAt4Qv; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932560AbbD0Myz (ORCPT ); Mon, 27 Apr 2015 08:54:55 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:34363 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932498AbbD0Myw (ORCPT ); Mon, 27 Apr 2015 08:54:52 -0400 Received: by pacyx8 with SMTP id yx8so128525658pac.1; Mon, 27 Apr 2015 05:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LYcBe4bJYuD5sffnD/mBIt/i/ZFFVMLsSYlRfu3ScWg=; b=z/RAt4Qv55t9MnOPLJnjxpvcL8ZcHHOWBOgGdW4A45fVCP0jxk14wcZQlPMwLG1SxR DwdOcK40ZEWs9uCR8YUnJQaeu9GsxzAYBZqx0EjM4mnmjP8tkpbrt66Kfnjqq4YDK9j6 Aeu8NH5RgqOFSxMv2CkhvSBs/ycj8I3lPIR4E+bmhYCRLmvLVU0fa1LkjkClj4UXcsbo 8o066GIPgwWqXOJbo9EU3XMcQdhojFBZDEnhkLzAGVDpX7HPYeHoiCStGNzQg5VfTXEs memGys91i896mNQ2CbkVwz3tl+uoqq7NMr5hVfJWV7mtIp/3jQ24DBgmN1LA+plEVh1U A8vg== X-Received: by 10.70.25.37 with SMTP id z5mr22041308pdf.36.1430139292361; Mon, 27 Apr 2015 05:54:52 -0700 (PDT) Received: from localhost.localdomain ([125.130.175.98]) by mx.google.com with ESMTPSA id o3sm11840539pds.1.2015.04.27.05.54.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Apr 2015 05:54:51 -0700 (PDT) From: Krzysztof Kozlowski To: Ray Jui , Linus Walleij , Alexandre Courbot , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] gpio: Constify irq_domain_ops Date: Mon, 27 Apr 2015 21:54:07 +0900 Message-Id: <1430139247-4198-2-git-send-email-k.kozlowski.k@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430139247-4198-1-git-send-email-k.kozlowski.k@gmail.com> References: <1430139247-4198-1-git-send-email-k.kozlowski.k@gmail.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The irq_domain_ops are not modified by the driver and the irqdomain core code accepts pointer to a const data. Signed-off-by: Krzysztof Kozlowski --- drivers/gpio/gpio-bcm-kona.c | 2 +- drivers/gpio/gpio-em.c | 2 +- drivers/gpio/gpio-grgpio.c | 2 +- drivers/gpio/gpio-mpc8xxx.c | 2 +- drivers/gpio/gpio-sa1100.c | 2 +- drivers/gpio/gpio-sodaville.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index b164ce837b43..cb89f37ffc02 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -534,7 +534,7 @@ static void bcm_kona_gpio_irq_unmap(struct irq_domain *d, unsigned int irq) irq_set_chip_data(irq, NULL); } -static struct irq_domain_ops bcm_kona_irq_ops = { +static const struct irq_domain_ops bcm_kona_irq_ops = { .map = bcm_kona_gpio_irq_map, .unmap = bcm_kona_gpio_irq_unmap, .xlate = irq_domain_xlate_twocell, diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 3cfcfc620c8e..fbf287307c4c 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -266,7 +266,7 @@ static int em_gio_irq_domain_map(struct irq_domain *h, unsigned int irq, return 0; } -static struct irq_domain_ops em_gio_irq_domain_ops = { +static const struct irq_domain_ops em_gio_irq_domain_ops = { .map = em_gio_irq_domain_map, .xlate = irq_domain_xlate_twocell, }; diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index 35a02770c8b0..0a8f7617e72e 100644 --- a/drivers/gpio/gpio-grgpio.c +++ b/drivers/gpio/gpio-grgpio.c @@ -332,7 +332,7 @@ static void grgpio_irq_unmap(struct irq_domain *d, unsigned int irq) spin_unlock_irqrestore(&priv->bgc.lock, flags); } -static struct irq_domain_ops grgpio_irq_domain_ops = { +static const struct irq_domain_ops grgpio_irq_domain_ops = { .map = grgpio_irq_map, .unmap = grgpio_irq_unmap, }; diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index a65b75161aa4..20aa66f34f6e 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -329,7 +329,7 @@ static int mpc8xxx_gpio_irq_map(struct irq_domain *h, unsigned int irq, return 0; } -static struct irq_domain_ops mpc8xxx_gpio_irq_ops = { +static const struct irq_domain_ops mpc8xxx_gpio_irq_ops = { .map = mpc8xxx_gpio_irq_map, .xlate = irq_domain_xlate_twocell, }; diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c index bec397a60204..3fa22dade243 100644 --- a/drivers/gpio/gpio-sa1100.c +++ b/drivers/gpio/gpio-sa1100.c @@ -160,7 +160,7 @@ static int sa1100_gpio_irqdomain_map(struct irq_domain *d, return 0; } -static struct irq_domain_ops sa1100_gpio_irqdomain_ops = { +static const struct irq_domain_ops sa1100_gpio_irqdomain_ops = { .map = sa1100_gpio_irqdomain_map, .xlate = irq_domain_xlate_onetwocell, }; diff --git a/drivers/gpio/gpio-sodaville.c b/drivers/gpio/gpio-sodaville.c index d8da36cd8123..65bc9f47a68e 100644 --- a/drivers/gpio/gpio-sodaville.c +++ b/drivers/gpio/gpio-sodaville.c @@ -125,7 +125,7 @@ static int sdv_xlate(struct irq_domain *h, struct device_node *node, return 0; } -static struct irq_domain_ops irq_domain_sdv_ops = { +static const struct irq_domain_ops irq_domain_sdv_ops = { .xlate = sdv_xlate, };