summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-03-10 11:20:49 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-05 11:23:37 +0200
commit2d6c2dee59a396b22fff6d708db4b167281e78c2 (patch)
treecf92fd5b7896fa168fb32090d638eb60cbbec6d8
parent06e04b450bb49f34d859f49c50d6609dd2008f2f (diff)
downloadlinux-stable-2d6c2dee59a396b22fff6d708db4b167281e78c2.tar.gz
linux-stable-2d6c2dee59a396b22fff6d708db4b167281e78c2.tar.bz2
linux-stable-2d6c2dee59a396b22fff6d708db4b167281e78c2.zip
thunderbolt: Use const qualifier for `ring_interrupt_index`
commit 1716efdb07938bd6510e1127d02012799112c433 upstream. `ring_interrupt_index` doesn't change the data for `ring` so mark it as const. This is needed by the following patch that disables interrupt auto clear for rings. Cc: Sanju Mehta <Sanju.Mehta@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/thunderbolt/nhi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index db80dc5dfeba..fd1b59397c70 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -36,7 +36,7 @@
#define NHI_MAILBOX_TIMEOUT 500 /* ms */
-static int ring_interrupt_index(struct tb_ring *ring)
+static int ring_interrupt_index(const struct tb_ring *ring)
{
int bit = ring->hop;
if (!ring->is_tx)