linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: linux-mips@linux-mips.org, ralf@linux-mips.org
Cc: linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
Subject: [PATCH v2 8/8] MIPS: OCTEON: Simplify code in octeon_irq_ciu_gpio_set_type()
Date: Tue,  9 Feb 2016 11:00:13 -0800	[thread overview]
Message-ID: <1455044413-9823-9-git-send-email-ddaney.cavm@gmail.com> (raw)
In-Reply-To: <1455044413-9823-1-git-send-email-ddaney.cavm@gmail.com>

From: David Daney <david.daney@cavium.com>

Use the trigger type passed in to the function instead of reading it
back out of the irq_data.

Signed-off-by: David Daney <david.daney@cavium.com>
---
 arch/mips/cavium-octeon/octeon-irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index 9b6a65b..368eb49 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -713,7 +713,7 @@ static int octeon_irq_ciu_gpio_set_type(struct irq_data *data, unsigned int t)
 	irqd_set_trigger_type(data, t);
 	octeon_irq_gpio_setup(data);
 
-	if (irqd_get_trigger_type(data) & IRQ_TYPE_EDGE_BOTH)
+	if (t & IRQ_TYPE_EDGE_BOTH)
 		irq_set_handler_locked(data, handle_edge_irq);
 	else
 		irq_set_handler_locked(data, handle_level_irq);
-- 
1.7.11.7

      parent reply	other threads:[~2016-02-09 19:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 19:00 [PATCH v2 0/8] MIPS: Add support for OCTEON cn78xx and cn73xx David Daney
2016-02-09 19:00 ` [PATCH v2 1/8] MIPS: OCTEON: Remove some code limiting NR_IRQS to 255 David Daney
2016-02-09 19:00 ` [PATCH v2 2/8] MIPS: Select CONFIG_HANDLE_DOMAIN_IRQ and make it work David Daney
2016-02-09 19:00 ` [PATCH v2 3/8] MIPS: OCTEON: Add register definitions for cn73xx, cnf75xx and cn78xx David Daney
2016-02-09 19:00 ` [PATCH v2 4/8] MIPS: OCTEON: Add model checking support " David Daney
2016-02-09 19:00 ` [PATCH v2 5/8] MIPS: OCTEON: Don't attempt to use nonexistent registers on OCTEON III models David Daney
2016-02-09 19:00 ` [PATCH v2 6/8] [PATCH] MIPS: OCTEON: Add support for OCTEON III interrupt controller David Daney
2016-02-09 19:00 ` [PATCH v2 7/8] MIPS: OCTEON: Add SMP support for OCTEON cn78xx et al David Daney
2016-02-09 19:00 ` David Daney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455044413-9823-9-git-send-email-ddaney.cavm@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=david.daney@cavium.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).