From: Mark Einon <mark.einon@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, tklauser@distanz.ch,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Mark Einon <mark.einon@gmail.com>
Subject: [PATCH 4/4] staging: et131x: Remove unnecessary defines to enable driver PM
Date: Tue, 23 Sep 2014 20:41:14 +0100 [thread overview]
Message-ID: <1411501274-2970-4-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <1411501274-2970-1-git-send-email-mark.einon@gmail.com>
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>
---
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
WARNING: multiple messages have this Message-ID (diff)
From: Mark Einon <mark.einon@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Mark Einon <mark.einon@gmail.com>
Subject: [PATCH 4/4] staging: et131x: Remove unnecessary defines to enable driver PM
Date: Tue, 23 Sep 2014 20:41:14 +0100 [thread overview]
Message-ID: <1411501274-2970-4-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <1411501274-2970-1-git-send-email-mark.einon@gmail.com>
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>
---
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
next prev parent reply other threads:[~2014-09-23 19:41 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 21:28 [RFC PATCH linux-next] et131x: Promote staging et131x driver to drivers/net Mark Einon
2014-09-22 23:56 ` Angus Gibson
2014-09-23 9:51 ` Mark Einon
2014-09-23 9:51 ` Mark Einon
2014-09-23 1:57 ` Joe Perches
2014-09-23 9:50 ` Mark Einon
2014-09-23 9:50 ` Mark Einon
2014-09-23 7:22 ` Tobias Klauser
2014-09-23 7:22 ` Tobias Klauser
2014-09-23 9:46 ` Mark Einon
2014-09-23 9:46 ` Mark Einon
2014-09-23 10:01 ` Tobias Klauser
2014-09-23 10:01 ` Tobias Klauser
2014-09-23 11:06 ` Mark Einon
2014-09-23 11:06 ` Mark Einon
2014-09-23 19:41 ` [PATCH 1/4] staging: et131x: zero allocation of fbr to prevent random address access Mark Einon
2014-09-23 19:41 ` Mark Einon
2014-09-23 19:41 ` [PATCH 2/4] staging: et131x: don't cast a void* to a struct pointer Mark Einon
2014-09-23 19:41 ` Mark Einon
2014-09-23 19:41 ` [PATCH 3/4] staging: et131x: Add space after { in pci ID table Mark Einon
2014-09-23 19:41 ` Mark Einon
2014-09-23 19:41 ` Mark Einon [this message]
2014-09-23 19:41 ` [PATCH 4/4] staging: et131x: Remove unnecessary defines to enable driver PM Mark Einon
2014-09-23 19:02 ` [RFC PATCH linux-next] et131x: Promote staging et131x driver to drivers/net Francois Romieu
2014-09-23 19:17 ` Joe Perches
2014-09-23 20:07 ` Francois Romieu
2014-09-23 20:07 ` Francois Romieu
2014-09-23 20:05 ` [PATCH v2] " Mark Einon
2014-09-23 20:05 ` Mark Einon
2014-09-23 21:07 ` Joe Perches
2014-09-23 21:07 ` Joe Perches
2014-09-24 8:54 ` [PATCH 1/4] staging: et131x: Use ether_addr_copy when copying ethernet addresses Mark Einon
2014-09-24 8:54 ` Mark Einon
2014-09-24 8:54 ` [PATCH 2/4] staging: et131x: Cat some lines less than 80 columns Mark Einon
2014-09-24 8:54 ` Mark Einon
2014-09-24 8:54 ` [PATCH 3/4] staging: et131x: Remove unnecessary OOM message Mark Einon
2014-09-24 8:54 ` Mark Einon
2014-09-24 8:54 ` [PATCH 4/4] staging: et131x: Remove unnecessary parentheses Mark Einon
2014-09-24 8:54 ` Mark Einon
2014-09-24 9:00 ` [PATCH v2] et131x: Promote staging et131x driver to drivers/net Mark Einon
2014-09-24 9:00 ` Mark Einon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411501274-2970-4-git-send-email-mark.einon@gmail.com \
--to=mark.einon@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tklauser@distanz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.