Skip to content

Commit

Permalink
dmaengine: at_xdmac: use __maybe_unused for pm functions
Browse files Browse the repository at this point in the history
Use __maybe_unused for pm functions.

Signed-off-by: Claudiu Beznea <[email protected]>
Reviewed-by: Tudor Ambarus <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
claudiubeznea authored and vinodkoul committed Oct 18, 2021
1 parent 320c88a commit b183d41
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/dma/at_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,8 +1950,7 @@ static void at_xdmac_axi_config(struct platform_device *pdev)
}
}

#ifdef CONFIG_PM
static int atmel_xdmac_prepare(struct device *dev)
static int __maybe_unused atmel_xdmac_prepare(struct device *dev)
{
struct at_xdmac *atxdmac = dev_get_drvdata(dev);
struct dma_chan *chan, *_chan;
Expand All @@ -1965,12 +1964,8 @@ static int atmel_xdmac_prepare(struct device *dev)
}
return 0;
}
#else
# define atmel_xdmac_prepare NULL
#endif

#ifdef CONFIG_PM_SLEEP
static int atmel_xdmac_suspend(struct device *dev)
static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
{
struct at_xdmac *atxdmac = dev_get_drvdata(dev);
struct dma_chan *chan, *_chan;
Expand All @@ -1994,7 +1989,7 @@ static int atmel_xdmac_suspend(struct device *dev)
return 0;
}

static int atmel_xdmac_resume(struct device *dev)
static int __maybe_unused atmel_xdmac_resume(struct device *dev)
{
struct at_xdmac *atxdmac = dev_get_drvdata(dev);
struct at_xdmac_chan *atchan;
Expand Down Expand Up @@ -2032,7 +2027,6 @@ static int atmel_xdmac_resume(struct device *dev)
}
return 0;
}
#endif /* CONFIG_PM_SLEEP */

static int at_xdmac_probe(struct platform_device *pdev)
{
Expand Down

0 comments on commit b183d41

Please sign in to comment.