From patchwork Fri Nov 13 12:04:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7611111 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7BFC79F2F7 for ; Fri, 13 Nov 2015 12:16:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A43F42065D for ; Fri, 13 Nov 2015 12:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A93112063E for ; Fri, 13 Nov 2015 12:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754594AbbKMMQW (ORCPT ); Fri, 13 Nov 2015 07:16:22 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:57667 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753698AbbKMMQV (ORCPT ); Fri, 13 Nov 2015 07:16:21 -0500 X-IronPort-AV: E=Sophos;i="5.20,287,1444687200"; d="scan'208";a="153716666" Received: from palace.rsr.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 13 Nov 2015 13:16:19 +0100 From: Julia Lawall To: Robert Baldyga Cc: kernel-janitors@vger.kernel.org, Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , linux-nfc@lists.01.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] nfc: s3fwrn5: constify s3fwrn5_phy_ops structures Date: Fri, 13 Nov 2015 13:04:41 +0100 Message-Id: <1447416281-3357-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The s3fwrn5_phy_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Robert Baldyga --- drivers/nfc/s3fwrn5/core.c | 2 +- drivers/nfc/s3fwrn5/i2c.c | 2 +- drivers/nfc/s3fwrn5/s3fwrn5.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c index 0d866ca..9d9c8d5 100644 --- a/drivers/nfc/s3fwrn5/core.c +++ b/drivers/nfc/s3fwrn5/core.c @@ -147,7 +147,7 @@ static struct nci_ops s3fwrn5_nci_ops = { }; int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev, - struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload) + const struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload) { struct s3fwrn5_info *info; int ret; diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c index c61d8a3..3ed0adf 100644 --- a/drivers/nfc/s3fwrn5/i2c.c +++ b/drivers/nfc/s3fwrn5/i2c.c @@ -125,7 +125,7 @@ static int s3fwrn5_i2c_write(void *phy_id, struct sk_buff *skb) return 0; } -static struct s3fwrn5_phy_ops i2c_phy_ops = { +static const struct s3fwrn5_phy_ops i2c_phy_ops = { .set_wake = s3fwrn5_i2c_set_wake, .set_mode = s3fwrn5_i2c_set_mode, .get_mode = s3fwrn5_i2c_get_mode, diff --git a/drivers/nfc/s3fwrn5/s3fwrn5.h b/drivers/nfc/s3fwrn5/s3fwrn5.h index 89210d4..7d5e516 100644 --- a/drivers/nfc/s3fwrn5/s3fwrn5.h +++ b/drivers/nfc/s3fwrn5/s3fwrn5.h @@ -44,7 +44,7 @@ struct s3fwrn5_info { void *phy_id; struct device *pdev; - struct s3fwrn5_phy_ops *phy_ops; + const struct s3fwrn5_phy_ops *phy_ops; unsigned int max_payload; struct s3fwrn5_fw_info fw_info; @@ -90,7 +90,7 @@ static inline int s3fwrn5_write(struct s3fwrn5_info *info, struct sk_buff *skb) } int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev, - struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload); + const struct s3fwrn5_phy_ops *phy_ops, unsigned int max_payload); void s3fwrn5_remove(struct nci_dev *ndev); int s3fwrn5_recv_frame(struct nci_dev *ndev, struct sk_buff *skb,