On Tue, Jan 31, 2012 at 2:20 PM, Florian Fainelli <flor...@openwrt.org> wrote:
> On Tuesday 31 January 2012 21:19:22 Grant Likely wrote:
>> > +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.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to