From 03dbd6813cf220d74f7a517e32166380b9d3a08d Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Wed, 15 Apr 2020 14:15:53 -0700 Subject: [PATCH] irqchip: Declare the msm_show_resume_irq_mask in a header msm_show_resume_irq_mask is currently being declared by individual drivers as needed. However, it creates scalability issues and looks ugly. Hence, place the variable in a common header file so that the drivers can just include it. Change-Id: I35348a6a280c15a5ad4744097f1075f165af1bc8 Signed-off-by: Raghavendra Rao Ananta --- drivers/base/power/power.h | 7 +------ drivers/irqchip/irq-gic-common.h | 8 ++------ include/linux/msm_show_resume_irq.h | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 include/linux/msm_show_resume_irq.h diff --git a/drivers/base/power/power.h b/drivers/base/power/power.h index 996a22323a03..5ca000a54c14 100644 --- a/drivers/base/power/power.h +++ b/drivers/base/power/power.h @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include +#include static inline void device_pm_init_common(struct device *dev) { @@ -99,12 +100,6 @@ extern int pm_async_enabled; /* drivers/base/power/main.c */ extern struct list_head dpm_list; /* The active device list */ -#ifdef CONFIG_QCOM_SHOW_RESUME_IRQ -extern int msm_show_resume_irq_mask; -#else -#define msm_show_resume_irq_mask 0 -#endif - static inline struct device *to_device(struct list_head *entry) { return container_of(entry, struct device, power.entry); diff --git a/drivers/irqchip/irq-gic-common.h b/drivers/irqchip/irq-gic-common.h index 93dfacb4062e..3213c3536d50 100644 --- a/drivers/irqchip/irq-gic-common.h +++ b/drivers/irqchip/irq-gic-common.h @@ -10,6 +10,8 @@ #include #include +#include + struct gic_quirk { const char *desc; const char *compatible; @@ -18,12 +20,6 @@ struct gic_quirk { u32 mask; }; -#ifdef CONFIG_QCOM_SHOW_RESUME_IRQ -extern int msm_show_resume_irq_mask; -#else -#define msm_show_resume_irq_mask 0 -#endif - int gic_configure_irq(unsigned int irq, unsigned int type, void __iomem *base, void (*sync_access)(void)); void gic_dist_config(void __iomem *base, int gic_irqs, diff --git a/include/linux/msm_show_resume_irq.h b/include/linux/msm_show_resume_irq.h new file mode 100644 index 000000000000..53e8ffdf47db --- /dev/null +++ b/include/linux/msm_show_resume_irq.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + */ + +#ifndef __MSM_SHOW_RESUME_IRQ_H +#define __MSM_SHOW_RESUME_IRQ_H + +#ifdef CONFIG_QCOM_SHOW_RESUME_IRQ +extern int msm_show_resume_irq_mask; +#else +#define msm_show_resume_irq_mask 0 +#endif + +#endif + +