lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200908031820.42760.elendil@planet.nl>
Date:	Mon, 3 Aug 2009 18:20:41 +0200
From:	Frans Pop <elendil@...net.nl>
To:	Albin Tonnerre <albin.tonnerre@...e-electrons.com>
Cc:	haavard.skinnemoen@...el.com, nicolas.ferre@...el.com,
	linux@...im.org.za, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Switch atmel_serial to dev_pm_ops

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ