From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Greg KH <greg@kroah.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
Chunyan Zhang <zhang.chunyan@linaro.org>,
linux-kernel@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: [GIT PULL 07/10] intel_th: Pick up irq number from resources
Date: Thu, 29 Mar 2018 14:14:15 +0300 [thread overview]
Message-ID: <20180329111418.9416-8-alexander.shishkin@linux.intel.com> (raw)
In-Reply-To: <20180329111418.9416-1-alexander.shishkin@linux.intel.com>
Platform devices pass their IRQs around as resources, so as a convenience
for the glue layer code, allow them pass the IRQ to the core driver in
the resources array.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
drivers/hwtracing/intel_th/core.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index d295b221e0bc..8f820c182240 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -805,7 +805,14 @@ intel_th_alloc(struct device *dev, struct intel_th_drvdata *drvdata,
struct resource *devres, unsigned int ndevres, int irq)
{
struct intel_th *th;
- int err;
+ int err, r;
+
+ if (irq == -1)
+ for (r = 0; r < ndevres; r++)
+ if (devres[r].flags & IORESOURCE_IRQ) {
+ irq = devres[r].start;
+ break;
+ }
th = kzalloc(sizeof(*th), GFP_KERNEL);
if (!th)
--
2.16.2
next prev parent reply other threads:[~2018-03-29 11:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 11:14 [GIT PULL 00/10] stm class/intel_th: Updates for v4.17 Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 01/10] MAINTAINERS: Bestow upon myself the care for drivers/hwtracing Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 02/10] stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 03/10] stm class: Make dummy's master/channel ranges configurable Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 04/10] intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 05/10] intel_th: Use correct method of finding hub Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 06/10] intel_th: Don't touch switch routing in host mode Alexander Shishkin
2018-03-29 11:14 ` Alexander Shishkin [this message]
2018-03-29 11:14 ` [GIT PULL 08/10] intel_th: Allow forcing host mode through drvdata Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 09/10] intel_th: Add ACPI glue layer Alexander Shishkin
2018-03-29 11:14 ` [GIT PULL 10/10] hwtracing: Add HW tracing support menu Alexander Shishkin
2018-03-29 16:40 ` [GIT PULL 00/10] stm class/intel_th: Updates for v4.17 Greg KH
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=20180329111418.9416-8-alexander.shishkin@linux.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=zhang.chunyan@linaro.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
all inboxes | Powered by JetHome®