summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-06-01 15:04:25 +0800
committerLee Jones <lee.jones@linaro.org>2021-06-02 10:51:19 +0100
commitba4672ad10571d785e266cd21bfdb31cc21567c9 (patch)
treeb428ce14fa77460d7244e7a988ae10408574523a /drivers/mfd
parent5c058e92ad35844418991999e46de88501bd52db (diff)
mfd: 88pm805: Use DEFINE_RES_IRQ_NAMED() to simplify code
No functional change. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/88pm805.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/drivers/mfd/88pm805.c b/drivers/mfd/88pm805.c
index 39f2302e137b..ada6c513302b 100644
--- a/drivers/mfd/88pm805.c
+++ b/drivers/mfd/88pm805.c
@@ -54,27 +54,14 @@ enum {
};
static struct resource codec_resources[] = {
- {
- /* Headset microphone insertion or removal */
- .name = "micin",
- .start = PM805_IRQ_MIC_DET,
- .end = PM805_IRQ_MIC_DET,
- .flags = IORESOURCE_IRQ,
- },
- {
- /* Audio short HP1 */
- .name = "audio-short1",
- .start = PM805_IRQ_HP1_SHRT,
- .end = PM805_IRQ_HP1_SHRT,
- .flags = IORESOURCE_IRQ,
- },
- {
- /* Audio short HP2 */
- .name = "audio-short2",
- .start = PM805_IRQ_HP2_SHRT,
- .end = PM805_IRQ_HP2_SHRT,
- .flags = IORESOURCE_IRQ,
- },
+ /* Headset microphone insertion or removal */
+ DEFINE_RES_IRQ_NAMED(PM805_IRQ_MIC_DET, "micin"),
+
+ /* Audio short HP1 */
+ DEFINE_RES_IRQ_NAMED(PM805_IRQ_HP1_SHRT, "audio-short1"),
+
+ /* Audio short HP2 */
+ DEFINE_RES_IRQ_NAMED(PM805_IRQ_HP2_SHRT, "audio-short2"),
};
static const struct mfd_cell codec_devs[] = {