@@ -310,7 +310,6 @@ static int __maybe_unused atomisp_restore_iunit_reg(struct atomisp_device *isp)
return 0;
}
-#ifdef CONFIG_PM
static int atomisp_mrfld_pre_power_down(struct atomisp_device *isp)
{
struct pci_dev *dev = isp->pdev;
@@ -550,7 +549,7 @@ int atomisp_runtime_resume(struct device *dev)
return 0;
}
-static int atomisp_suspend(struct device *dev)
+static int __maybe_unused atomisp_suspend(struct device *dev)
{
struct atomisp_device *isp = (struct atomisp_device *)
dev_get_drvdata(dev);
@@ -588,7 +587,7 @@ static int atomisp_suspend(struct device *dev)
return atomisp_mrfld_power_down(isp);
}
-static int atomisp_resume(struct device *dev)
+static int __maybe_unused atomisp_resume(struct device *dev)
{
struct atomisp_device *isp = (struct atomisp_device *)
dev_get_drvdata(dev);
@@ -614,7 +613,6 @@ static int atomisp_resume(struct device *dev)
atomisp_freq_scaling(isp, ATOMISP_DFS_MODE_LOW, true);
return 0;
}
-#endif
int atomisp_csi_lane_config(struct atomisp_device *isp)
{
@@ -1576,7 +1574,6 @@ static const struct pci_device_id atomisp_pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, atomisp_pci_tbl);
-#ifdef CONFIG_PM
static const struct dev_pm_ops atomisp_pm_ops = {
.runtime_suspend = atomisp_runtime_suspend,
.runtime_resume = atomisp_runtime_resume,
@@ -1584,14 +1581,9 @@ static const struct dev_pm_ops atomisp_pm_ops = {
.resume = atomisp_resume,
};
-#define DEV_PM_OPS (&atomisp_pm_ops)
-#else
-#define DEV_PM_OPS NULL
-#endif
-
static struct pci_driver atomisp_pci_driver = {
.driver = {
- .pm = DEV_PM_OPS,
+ .pm = &atomisp_pm_ops,
},
.name = "atomisp-isp2",
.id_table = atomisp_pci_tbl,