linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 06/18] ARM: clps711x: cdb89712: Special driver for handling memory is removed
Date: Thu, 10 Jan 2013 17:20:16 +0100	[thread overview]
Message-ID: <20130110162016.GD14860@pengutronix.de> (raw)
In-Reply-To: <20130110193916.16f1a92eb5048250004b6b03@mail.ru>

Hello Alexander,

On Thu, Jan 10, 2013 at 07:39:16PM +0400, Alexander Shiyan wrote:
> On Thu, 10 Jan 2013 15:09:21 +0100
> Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> wrote:
> 
> ...
> > >  static void __init cdb89712_init(void)
> > >  {
> > > +	platform_device_register(&cdb89712_flash_pdev);
> > > +	platform_device_register(&cdb89712_bootrom_pdev);
> > > +	platform_device_register(&cdb89712_sram_pdev);
> > This is broken, all these structs are located in .init.data which is
> > discarded after the machine is fully booted. Also platformdata must not
> > live in init data. Consider using platform_device_register_full which
> > allows more data to be init data.
> 
> I agree. Error is invisible when not using loadable modules, but will
> become apparent when using these.
This is not true. It can trigger a problem for sure when you rebind the
driver via sysfs. And in general you cannot assume that a driver doesn't
need platform_data or it's struct platform_device during operation. Take
for example physmap_flash_shutdown (defined in
drivers/mtd/maps/physmap.c). Maybe even $(find /sys) triggers a problem.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2013-01-10 16:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-17 13:57 [PATCH v3 00/18] ARM: Patchset for CLPS711X Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 01/18] ARM: clps711x: Using platform_driver for ethernet device Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 02/18] ARM: clps711x: p720t: Using "leds-gpio" driver for LED control Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 03/18] ARM: clps711x: Transform clps711x-framebuffer to platform driver and use it Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 04/18] ARM: clps711x: p720t: Unneeded inclusion of head-sa1100.S removed Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 05/18] ARM: clps711x: Always select AUTO_ZRELADDR for a platform Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 06/18] ARM: clps711x: cdb89712: Special driver for handling memory is removed Alexander Shiyan
2013-01-10 14:09   ` Uwe Kleine-König
2013-01-10 15:39     ` Alexander Shiyan
2013-01-10 16:20       ` Uwe Kleine-König [this message]
2012-11-17 13:57 ` [PATCH v3 07/18] ARM: clps711x: Implement usage "SPARSE_IRQ" kernel option for a platform Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 08/18] ARM: clps711x: Implement usage "MULTI_IRQ_HANDLER" " Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 09/18] ARM: clps711x: Add FIQ interrupt handling Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 10/18] ARM: clps711x: Unused empty "ACK" calls for IRQ-chips removed Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 11/18] ARM: clps711x: autcpu12: Special driver for handling NAND memory is removed Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 12/18] ARM: clps711x: Moving power management of framebuffer driver to the board Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 13/18] ARM: clps711x: p720t: Special driver for handling NAND memory is removed Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 14/18] ARM: clps711x: Moving backlight controls of framebuffer driver to the board Alexander Shiyan
2012-11-21  6:37   ` Olof Johansson
2012-11-17 13:57 ` [PATCH v3 15/18] ARM: clps711x: edb7211: Add support for NOR-Flash Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 16/18] ARM: clps711x: Rename board files to match functionality Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 17/18] ARM: clps711x: Update defconfig due latest changes and new kernel symbols Alexander Shiyan
2012-11-17 13:57 ` [PATCH v3 18/18] MAINTAINERS: Add ARM CLPS711X entry Alexander Shiyan
2012-11-17 15:45 ` [PATCH v3 00/18] ARM: Patchset for CLPS711X Arnd Bergmann
2012-11-19 10:00   ` Linus Walleij
2012-11-21  6:36   ` Olof Johansson
2012-11-21  9:46     ` Linus Walleij
2012-11-21 10:18     ` Olof Johansson
2012-11-21 10:27       ` 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=20130110162016.GD14860@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.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;
as well as URLs for NNTP newsgroup(s).