From patchwork Mon May 4 17:36:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Bresticker X-Patchwork-Id: 6328981 Return-Path: X-Original-To: patchwork-linux-arm@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 0BBB09F1C2 for ; Mon, 4 May 2015 17:40:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 246F42026D for ; Mon, 4 May 2015 17:40:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2444A200E6 for ; Mon, 4 May 2015 17:40:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YpKJQ-0003Sh-4I; Mon, 04 May 2015 17:37:48 +0000 Received: from mail-pa0-f73.google.com ([209.85.220.73]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YpKIp-0002kI-Qz for linux-arm-kernel@lists.infradead.org; Mon, 04 May 2015 17:37:12 +0000 Received: by pablj1 with SMTP id lj1so12800841pab.0 for ; Mon, 04 May 2015 10:36:50 -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:in-reply-to :references; bh=PhX4YjBuXpwOFEUf513BNuPqJGfZDfV53R06ICZnD/Y=; b=YiBH6pj+4FietQvV6TTOVTpcuLtJGqFeSmMDnaNIBw45iq9c5T3COrQN/t4X1mJGfU 6chVozElhICIisc24ojDQTI0viaMjQO+R5qRsU9ybe+2TgTyPeXFBJ91e6ptH8fkU+Kp kvHgaRe0Wi2cZxnQ79lT+v07qTh/NTeS8A7SeCVvkHPUlLOirNncORsXRnSncNKA0nse noDHBAfSnWtcgHNOZL9qjrVy+yRkRbAbmInK3LVOxJOGaHQkjTH4Pl2Z9+oBkie+GYa2 P9SiPtg6oAesQ2f9b4l9/9841KR+zhX1IhBXe1TnDrfNM34T4KzV90n7UNnoGwJnWc+o lvtQ== X-Gm-Message-State: ALoCoQnxwnep5wiWpoZcqjieRibBpdbF8y38TbOkMKNUiGYUyaElh36B+4PVyoXAdI514KeGW/ui X-Received: by 10.66.190.36 with SMTP id gn4mr40879891pac.17.1430761010351; Mon, 04 May 2015 10:36:50 -0700 (PDT) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id o5si726865yhd.5.2015.05.04.10.36.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2015 10:36:50 -0700 (PDT) Received: from abrestic.mtv.corp.google.com ([172.22.65.70]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id ZOJ2t7JD.1; Mon, 04 May 2015 10:36:50 -0700 Received: by abrestic.mtv.corp.google.com (Postfix, from userid 137652) id BD546A4919; Mon, 4 May 2015 10:36:48 -0700 (PDT) From: Andrew Bresticker To: Stephen Warren , Thierry Reding , Alexandre Courbot Subject: [PATCH v8 2/9] mailbox: Make mbox_chan_ops const Date: Mon, 4 May 2015 10:36:35 -0700 Message-Id: <1430761002-9327-3-git-send-email-abrestic@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1430761002-9327-1-git-send-email-abrestic@chromium.org> References: <1430761002-9327-1-git-send-email-abrestic@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150504_103711_903330_FC0E9D3D X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: -0.7 (/) Cc: devicetree@vger.kernel.org, Jassi Brar , Andrew Bresticker , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jon Hunter , Ashwin Chaugule , linux-tegra@vger.kernel.org, Ley Foon Tan , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 mailbox controller's channel ops ought to be read-only. Update all the mailbox drivers to make their mbox_chan_ops const as well. Signed-off-by: Andrew Bresticker Cc: Jassi Brar Cc: Suman Anna Cc: Ashwin Chaugule Cc: Ley Foon Tan Acked-by: Suman Anna --- Changes from v7: - Constify all drivers' mbox_chan_ops. No changes from v5/v6. New for v5. --- drivers/mailbox/arm_mhu.c | 2 +- drivers/mailbox/mailbox-altera.c | 2 +- drivers/mailbox/omap-mailbox.c | 2 +- drivers/mailbox/pcc.c | 2 +- include/linux/mailbox_controller.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c index ac693c6..d9e99f9 100644 --- a/drivers/mailbox/arm_mhu.c +++ b/drivers/mailbox/arm_mhu.c @@ -110,7 +110,7 @@ static void mhu_shutdown(struct mbox_chan *chan) free_irq(mlink->irq, chan); } -static struct mbox_chan_ops mhu_ops = { +static const struct mbox_chan_ops mhu_ops = { .send_data = mhu_send_data, .startup = mhu_startup, .shutdown = mhu_shutdown, diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c index a266265..bb682c9 100644 --- a/drivers/mailbox/mailbox-altera.c +++ b/drivers/mailbox/mailbox-altera.c @@ -285,7 +285,7 @@ static void altera_mbox_shutdown(struct mbox_chan *chan) } } -static struct mbox_chan_ops altera_mbox_ops = { +static const struct mbox_chan_ops altera_mbox_ops = { .send_data = altera_mbox_send_data, .startup = altera_mbox_startup, .shutdown = altera_mbox_shutdown, diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 0f332c1..03f8545 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -604,7 +604,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data) return ret; } -static struct mbox_chan_ops omap_mbox_chan_ops = { +static const struct mbox_chan_ops omap_mbox_chan_ops = { .startup = omap_mbox_chan_startup, .send_data = omap_mbox_chan_send_data, .shutdown = omap_mbox_chan_shutdown, diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 7e91d68..26d121d 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -198,7 +198,7 @@ static int pcc_send_data(struct mbox_chan *chan, void *data) return 0; } -static struct mbox_chan_ops pcc_chan_ops = { +static const struct mbox_chan_ops pcc_chan_ops = { .send_data = pcc_send_data, }; diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h index d4cf96f..68c4245 100644 --- a/include/linux/mailbox_controller.h +++ b/include/linux/mailbox_controller.h @@ -72,7 +72,7 @@ struct mbox_chan_ops { */ struct mbox_controller { struct device *dev; - struct mbox_chan_ops *ops; + const struct mbox_chan_ops *ops; struct mbox_chan *chans; int num_chans; bool txdone_irq;