Re: [PATCH] leds: Convert bd2802 driver to dev_pm_ops

From: Mark Brown
Date: Fri Jan 21 2011 - 07:13:59 EST


On Thu, Jan 20, 2011 at 03:35:28PM -0800, Andrew Morton wrote:

> It's tricky to get the compiler/linker to discard code and data without
> triggering an unused-var warning. cpu_notifier() does it by emitting a
> reference:

SIMPLE_DEV_PM_OPS() is being a bit more brute force than that - it
just defines out the reference if compiled without PM_SLEEP. You still
need the ifdefs around the function definitions, but not their uses.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/