irq-imx-irqsteer: fix compile error if CONFIG_PM_SLEEP is not set
- Fixed a compile error in imx_irqsteer_chans_enable where the type name
was used instead of the variable name
- Removed CONFIG_PM_SLEEP guards and marked runtime suspend api with
__maybe_unused
Fixes: 1b98a50887
("MLK-17290-01 irqchip: imx-irqsteer: add runtime pm support")
Signed-off-by: Michael Doswald <michael.doswald@schiller.ch>
(cherry picked from commit 391a7c6dfd13dbece8211b269d74c37875da0f67)
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
This commit is contained in:
parent
845099bfd0
commit
b598b85172
|
@ -200,7 +200,7 @@ static int imx_irqsteer_chans_enable(struct irqsteer_data *data)
|
|||
{
|
||||
int ret;
|
||||
|
||||
ret = clk_prepare_enable(irqsteer_data->ipg_clk);
|
||||
ret = clk_prepare_enable(data->ipg_clk);
|
||||
if (ret) {
|
||||
dev_err(data->dev, "failed to enable ipg clk: %d\n", ret);
|
||||
return ret;
|
||||
|
@ -330,8 +330,7 @@ static int imx_irqsteer_remove(struct platform_device *pdev)
|
|||
return pm_runtime_force_suspend(&pdev->dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static void imx_irqsteer_init(struct irqsteer_data *data)
|
||||
static void __maybe_unused imx_irqsteer_init(struct irqsteer_data *data)
|
||||
{
|
||||
/* steer all IRQs into configured channel */
|
||||
writel_relaxed(BIT(data->channel), data->regs + CHANCTRL);
|
||||
|
@ -342,7 +341,7 @@ static void imx_irqsteer_init(struct irqsteer_data *data)
|
|||
data->inited = true;
|
||||
}
|
||||
|
||||
static void imx_irqsteer_save_regs(struct irqsteer_data *data)
|
||||
static void __maybe_unused imx_irqsteer_save_regs(struct irqsteer_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -351,7 +350,7 @@ static void imx_irqsteer_save_regs(struct irqsteer_data *data)
|
|||
CHANMASK(i, data->reg_num));
|
||||
}
|
||||
|
||||
static void imx_irqsteer_restore_regs(struct irqsteer_data *data)
|
||||
static void __maybe_unused imx_irqsteer_restore_regs(struct irqsteer_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -361,7 +360,7 @@ static void imx_irqsteer_restore_regs(struct irqsteer_data *data)
|
|||
data->regs + CHANMASK(i, data->reg_num));
|
||||
}
|
||||
|
||||
static int imx_irqsteer_runtime_suspend(struct device *dev)
|
||||
static int __maybe_unused imx_irqsteer_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct irqsteer_data *irqsteer_data = dev_get_drvdata(dev);
|
||||
|
||||
|
@ -371,7 +370,7 @@ static int imx_irqsteer_runtime_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int imx_irqsteer_runtime_resume(struct device *dev)
|
||||
static int __maybe_unused imx_irqsteer_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct irqsteer_data *irqsteer_data = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
@ -390,7 +389,6 @@ static int imx_irqsteer_runtime_resume(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops imx_irqsteer_pm_ops = {
|
||||
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
|
|
Loading…
Reference in New Issue