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] [thread-next>] [day] [month] [year] [list]
Message-ID: <3053665.vhA4jELi7x@wuerfel>
Date:	Tue, 09 Sep 2014 11:27:12 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc:	Nicolas Ferre <nicolas.ferre@...el.com>,
	Olof Johansson <olof@...om.net>, arm@...nel.org,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
	Boris BREZILLON <boris.brezillon@...e-electrons.com>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
	Ludovic Desroches <ludovic.desroches@...el.com>
Subject: Re: [GIT PULL] at91: drivers for 3.18 #2

On Tuesday 09 September 2014 11:15:20 Maxime Ripard wrote:
> 
> > One of the problems with the current interface is that it requires
> > statically declaring platform_device structures, which is something
> > that has been on Greg's list of device model antipatterns for a long
> > time.
> 
> I didn't find any difference with how you declare platform_devices
> compared to the old-usual way in board files, or was it something on
> the list too ? 

Yes. We never really bothered with cleaning up the existing static
platform_device instances, because the plan is to move away from
board files to DT anyway, but in short, if you ever need to add
a platform device to a legacy board file, do it like

	pdev = platform_device_alloc(...);
	platform_device_register(dev);

or

	platform_device_register_simple(...);

or

	static const struct platform_device_info info __initconst = { ... };
	platform_device_register_full(&info);

but not

	static struct platform_device pdev = { ... };
	platform_device_register(&pdev);

Unfortunately, the early platform_device only allows the last type.

	Arnd
--
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