Thread (1 message) 1 message, 1 author, 2012-01-31

Re: [PATCH 9/9 v3] spi: add Broadcom BCM63xx SPI controller driver

From: Grant Likely <hidden>
Date: 2012-01-31 21:59:14
Also in: linux-spi

Possibly related (same subject, not in this thread)

On Tue, Jan 31, 2012 at 2:20 PM, Florian Fainelli [off-list ref] wrote:
On Tuesday 31 January 2012 21:19:22 Grant Likely wrote:
quoted
quoted
+static const struct dev_pm_ops bcm63xx_spi_pm_ops = {
+   .suspend        = bcm63xx_spi_suspend,
+   .resume         = bcm63xx_spi_resume,
+};
+
+#define BCM63XX_SPI_PM_OPS (&bcm63xx_spi_pm_ops)
+#else
+#define BCM63XX_SPI_PM_OPS NULL
A bit ugly.  Do this instead in the else clause and drop the
BCM63XX_SPI_PM_OPS:

#define bcm63xx_spi_pm_ops NULL
This won't work, because driver.pm must be set to a pointer to a struct
dev_pm_ops, that's why I used this trick to make it build fine in both cases.
If I follow your advice, with driver.pm = &bcm63xx_spi_pm_ops, it won't build
for CONFIG_PM=n.
Okay, fair enough.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help