Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL] at91: drivers for 3.18 #2
Date: Tue, 09 Sep 2014 11:27:12 +0200	[thread overview]
Message-ID: <3053665.vhA4jELi7x@wuerfel> (raw)
In-Reply-To: <20140909091520.GJ3804@lukather>

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

  reply	other threads:[~2014-09-09  9:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 16:36 [GIT PULL] at91: drivers for 3.18 #2 Nicolas Ferre
2014-09-05 21:25 ` Arnd Bergmann
2014-09-05 21:39   ` Arnd Bergmann
2014-09-08  9:26   ` Maxime Ripard
2014-09-08  9:52     ` Arnd Bergmann
2014-09-09  9:15       ` Maxime Ripard
2014-09-09  9:27         ` Arnd Bergmann [this message]
2014-09-15 16:12 ` [GIT PULL] at91: drivers for 3.18 #2 (bis) Nicolas Ferre
2014-09-24  4:59   ` Olof Johansson
2014-09-24 10:50     ` Nicolas Ferre
2014-09-24 17:34       ` Olof Johansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3053665.vhA4jELi7x@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox