Skip to content

Commit 8b34fe5

Browse files
ffainellihtejun
authored andcommitted
ata: ahci_brcmstb: Fix warnings with CONFIG_PM_SLEEP=n
When CONFIG_PM_SLEEP is disabled, brcm_ahci_{suspend,resume} are not used, which causes such a build warning to occur: CC drivers/ata/ahci_brcmstb.o drivers/ata/ahci_brcmstb.c:212:12: warning: 'brcm_ahci_suspend' defined but not used [-Wunused-function] static int brcm_ahci_suspend(struct device *dev) ^ drivers/ata/ahci_brcmstb.c:224:12: warning: 'brcm_ahci_resume' defined but not used [-Wunused-function] static int brcm_ahci_resume(struct device *dev) ^ LD drivers/ata/built-in.o Fixes: 766a2d9 ("ata: add Broadcom AHCI SATA3 driver for STB chips") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 9051bd3 commit 8b34fe5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/ata/ahci_brcmstb.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ static void brcm_sata_init(struct brcm_ahci_priv *priv)
209209
priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL);
210210
}
211211

212+
#ifdef CONFIG_PM_SLEEP
212213
static int brcm_ahci_suspend(struct device *dev)
213214
{
214215
struct ata_host *host = dev_get_drvdata(dev);
@@ -231,6 +232,7 @@ static int brcm_ahci_resume(struct device *dev)
231232
brcm_sata_phys_enable(priv);
232233
return ahci_platform_resume(dev);
233234
}
235+
#endif
234236

235237
static struct scsi_host_template ahci_platform_sht = {
236238
AHCI_SHT(DRV_NAME),

0 commit comments

Comments
 (0)