Skip to content

Commit

Permalink
[SCSI] isci: add CONFIG_PM_SLEEP to suspend/resume functions
Browse files Browse the repository at this point in the history
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
the CONFIG_PM_SLEEP is enabled.

drivers/scsi/isci/init.c:725:12: warning: 'isci_suspend' defined but not used [-Wunused-function]
drivers/scsi/isci/init.c:743:12: warning: 'isci_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Jingoo Han authored and James Bottomley committed Apr 11, 2013
1 parent 7a3ad39 commit 4eeb587
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/isci/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ static void isci_pci_remove(struct pci_dev *pdev)
}
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int isci_suspend(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
Expand Down Expand Up @@ -770,18 +770,16 @@ static int isci_resume(struct device *dev)

return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(isci_pm_ops, isci_suspend, isci_resume);
#endif

static struct pci_driver isci_pci_driver = {
.name = DRV_NAME,
.id_table = isci_id_table,
.probe = isci_pci_probe,
.remove = isci_pci_remove,
#ifdef CONFIG_PM
.driver.pm = &isci_pm_ops,
#endif
};

static __init int isci_init(void)
Expand Down

0 comments on commit 4eeb587

Please sign in to comment.