Skip to content

Commit d40f0d8

Browse files
einonmgregkh
authored andcommitted
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@distanz.ch> Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b57cb55 commit d40f0d8

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎drivers/staging/et131x/et131x.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3607,12 +3607,9 @@ static int et131x_resume(struct device *dev)
36073607

36083608
return 0;
36093609
}
3610+
#endif
36103611

36113612
static SIMPLE_DEV_PM_OPS(et131x_pm_ops, et131x_suspend, et131x_resume);
3612-
#define ET131X_PM_OPS (&et131x_pm_ops)
3613-
#else
3614-
#define ET131X_PM_OPS NULL
3615-
#endif
36163613

36173614
/* et131x_isr - The Interrupt Service Routine for the driver.
36183615
* @irq: the IRQ on which the interrupt was received.
@@ -4406,7 +4403,7 @@ static struct pci_driver et131x_driver = {
44064403
.id_table = et131x_pci_table,
44074404
.probe = et131x_pci_setup,
44084405
.remove = et131x_pci_remove,
4409-
.driver.pm = ET131X_PM_OPS,
4406+
.driver.pm = &et131x_pm_ops,
44104407
};
44114408

44124409
module_pci_driver(et131x_driver);

0 commit comments

Comments
 (0)