[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411501274-2970-4-git-send-email-mark.einon@gmail.com>
Date: Tue, 23 Sep 2014 20:41:14 +0100
From: Mark Einon <mark.einon@...il.com>
To: gregkh@...uxfoundation.org
Cc: devel@...verdev.osuosl.org, tklauser@...tanz.ch,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Mark Einon <mark.einon@...il.com>
Subject: [PATCH 4/4] staging: et131x: Remove unnecessary defines to enable driver PM
The Power Management functions can be conditional by assigning pm ops
directly to .driver.pm, instead of using #ifdef's, saving some lines of
code.
Reported-by: Tobias Klauser <tklauser@...tanz.ch>
Signed-off-by: Mark Einon <mark.einon@...il.com>
---
drivers/staging/et131x/et131x.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 10f20b3..41fcaa0 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -3607,12 +3607,9 @@ static int et131x_resume(struct device *dev)
return 0;
}
+#endif
static SIMPLE_DEV_PM_OPS(et131x_pm_ops, et131x_suspend, et131x_resume);
-#define ET131X_PM_OPS (&et131x_pm_ops)
-#else
-#define ET131X_PM_OPS NULL
-#endif
/* et131x_isr - The Interrupt Service Routine for the driver.
* @irq: the IRQ on which the interrupt was received.
@@ -4406,7 +4403,7 @@ static struct pci_driver et131x_driver = {
.id_table = et131x_pci_table,
.probe = et131x_pci_setup,
.remove = et131x_pci_remove,
- .driver.pm = ET131X_PM_OPS,
+ .driver.pm = &et131x_pm_ops,
};
module_pci_driver(et131x_driver);
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists