Messages in this thread | | | From | Frans Pop <> | Subject | Re: [PATCH] Switch atmel_serial to dev_pm_ops | Date | Mon, 3 Aug 2009 18:20:41 +0200 |
| |
Albin Tonnerre wrote: >> Why not > >> #define atmel_serial_pm_ops NULL > > Because the .pm field is set to the address of atmel_serial_pm_ops, and > iirc taking the address of NULL is not allowed.
The following construction is possible however (first used by Magnus Damm for some of the SuperH drivers):
#ifdef CONFIG_PM [...] #define DRIVER_PM_OPS (&driver_pm_ops) #else #define DRIVER_PM_OPS NULL #endif
... .driver = { ... .pm = DRIVER_PM_OPS, } ...
Cheers, FJP
| |