|
@@ -42,9 +42,7 @@ struct xgene_gpio {
|
|
|
struct gpio_chip chip;
|
|
|
void __iomem *base;
|
|
|
spinlock_t lock;
|
|
|
-#ifdef CONFIG_PM
|
|
|
u32 set_dr_val[XGENE_MAX_GPIO_BANKS];
|
|
|
-#endif
|
|
|
};
|
|
|
|
|
|
static int xgene_gpio_get(struct gpio_chip *gc, unsigned int offset)
|
|
@@ -138,8 +136,7 @@ static int xgene_gpio_dir_out(struct gpio_chip *gc,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_PM
|
|
|
-static int xgene_gpio_suspend(struct device *dev)
|
|
|
+static __maybe_unused int xgene_gpio_suspend(struct device *dev)
|
|
|
{
|
|
|
struct xgene_gpio *gpio = dev_get_drvdata(dev);
|
|
|
unsigned long bank_offset;
|
|
@@ -152,7 +149,7 @@ static int xgene_gpio_suspend(struct device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int xgene_gpio_resume(struct device *dev)
|
|
|
+static __maybe_unused int xgene_gpio_resume(struct device *dev)
|
|
|
{
|
|
|
struct xgene_gpio *gpio = dev_get_drvdata(dev);
|
|
|
unsigned long bank_offset;
|
|
@@ -166,10 +163,6 @@ static int xgene_gpio_resume(struct device *dev)
|
|
|
}
|
|
|
|
|
|
static SIMPLE_DEV_PM_OPS(xgene_gpio_pm, xgene_gpio_suspend, xgene_gpio_resume);
|
|
|
-#define XGENE_GPIO_PM_OPS (&xgene_gpio_pm)
|
|
|
-#else
|
|
|
-#define XGENE_GPIO_PM_OPS NULL
|
|
|
-#endif
|
|
|
|
|
|
static int xgene_gpio_probe(struct platform_device *pdev)
|
|
|
{
|
|
@@ -241,7 +234,7 @@ static struct platform_driver xgene_gpio_driver = {
|
|
|
.name = "xgene-gpio",
|
|
|
.of_match_table = xgene_gpio_of_match,
|
|
|
.acpi_match_table = ACPI_PTR(xgene_gpio_acpi_match),
|
|
|
- .pm = XGENE_GPIO_PM_OPS,
|
|
|
+ .pm = &xgene_gpio_pm,
|
|
|
},
|
|
|
.probe = xgene_gpio_probe,
|
|
|
};
|