]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: et131x: Remove unnecessary defines to enable driver PM
authorMark Einon <mark.einon@gmail.com>
Tue, 23 Sep 2014 19:41:14 +0000 (20:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 06:38:16 +0000 (23:38 -0700)
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@distanz.ch>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/et131x/et131x.c

index 10f20b3d31e9b22d969cfd8366ab57bc3880587f..41fcaa0503ee8f3a87fc1902ae68f1b68b45fc06 100644 (file)
@@ -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);