From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lee Jones <lee.jones@linaro.org>,
Hans de Goede <hdegoede@redhat.com>,
linux-kernel@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/7] mfd: intel_msic: Use DEFINE_RES_IRQ() macro
Date: Thu, 30 Aug 2018 19:52:49 +0300 [thread overview]
Message-ID: <20180830165255.43114-1-andriy.shevchenko@linux.intel.com> (raw)
Instead of open coding each data structure with IRQ resources,
use dedicated macro.
In one case use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_MEM_NAMED().
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel_msic.c | 44 +++++++++-------------------------------
1 file changed, 10 insertions(+), 34 deletions(-)
diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c
index 2017446c5b4b..441de7b3d231 100644
--- a/drivers/mfd/intel_msic.c
+++ b/drivers/mfd/intel_msic.c
@@ -54,68 +54,44 @@ struct intel_msic {
};
static struct resource msic_touch_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
static struct resource msic_adc_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
static struct resource msic_battery_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
static struct resource msic_gpio_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
static struct resource msic_audio_resources[] = {
- {
- .name = "IRQ",
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ_NAMED(0, "IRQ"),
/*
* We will pass IRQ_BASE to the driver now but this can be removed
* when/if the driver starts to use intel_msic_irq_read().
*/
- {
- .name = "IRQ_BASE",
- .flags = IORESOURCE_MEM,
- .start = MSIC_IRQ_STATUS_ACCDET,
- .end = MSIC_IRQ_STATUS_ACCDET,
- },
+ DEFINE_RES_MEM_NAMED(MSIC_IRQ_STATUS_ACCDET, 1, "IRQ_BASE"),
};
static struct resource msic_hdmi_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
static struct resource msic_thermal_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
static struct resource msic_power_btn_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
static struct resource msic_ocd_resources[] = {
- {
- .flags = IORESOURCE_IRQ,
- },
+ DEFINE_RES_IRQ(0),
};
/*
--
2.18.0
next reply other threads:[~2018-08-30 16:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 16:52 Andy Shevchenko [this message]
2018-08-30 16:52 ` [PATCH v1 2/7] mfd: intel_soc_pmic_crc: Use DEFINE_RES_IRQ_NAMED() macro Andy Shevchenko
2018-08-31 12:53 ` Mika Westerberg
2018-09-10 15:51 ` Lee Jones
2018-08-30 16:52 ` [PATCH v1 3/7] mfd: intel_soc_pmic_crc: Use REGMAP_IRQ_REG() macro Andy Shevchenko
2018-08-31 12:54 ` Mika Westerberg
2018-09-10 15:51 ` Lee Jones
2018-08-30 16:52 ` [PATCH v1 4/7] mfd: intel_soc_pmic_bxtwc: Chain power button IRQs as well Andy Shevchenko
2018-08-31 12:54 ` Mika Westerberg
2018-09-10 15:51 ` Lee Jones
2018-08-30 16:52 ` [PATCH v1 5/7] mfd: Sort headers alphabetically for Intel PMIC drivers Andy Shevchenko
2018-08-31 12:55 ` Mika Westerberg
2018-09-10 15:51 ` Lee Jones
2018-08-30 16:52 ` [PATCH v1 6/7] mfd: Convert Intel PMIC drivers to use SPDX identifier Andy Shevchenko
2018-08-31 12:56 ` Mika Westerberg
2018-09-10 15:51 ` Lee Jones
2018-08-30 16:52 ` [PATCH v1 7/7] MAINTAINERS: Add myself as designated reviewer of Intel MFD PMIC Andy Shevchenko
2018-08-31 12:57 ` Mika Westerberg
2018-09-10 15:52 ` Lee Jones
2018-08-31 12:53 ` [PATCH v1 1/7] mfd: intel_msic: Use DEFINE_RES_IRQ() macro Mika Westerberg
2018-09-10 15:50 ` Lee Jones
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=20180830165255.43114-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/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