]> git.baikalelectronics.ru Git - kernel.git/commit
omap: drop __initdata tags from static struct platform_device declarations
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Mon, 4 Jul 2011 10:56:15 +0000 (03:56 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 4 Jul 2011 10:56:15 +0000 (03:56 -0700)
commita634020aca7d0800a9f1b3ccb5472a5d5a6c7b0c
tree55f00c4a08380b091253a48e728713b67214c2d0
parentb5cff96cc9f1cd9c0403c1b0973a5e6ad98c87f2
omap: drop __initdata tags from static struct platform_device declarations

Pointers to statically declared platform device structures which are
registered with platform_device_register() are then used during run time
to access these structure members, for example from platform_uevent()
and much more. Therefore, these structures should never be placed inside
sections which are dropped after boot. Fix platform devices incorrectly
tagged with __initdata which happen to exist inside OMAP sub-trees.

This bug has exhibited itself on my ARM/OMAP1 based Amstrad Delta
videophone after commit caf7470225809f670e8adca7c9101f02682a215a, "mm:
check if any page in a pageblock is reserved before marking it
MIGRATE_RESERVE", resulting in reading from several
/sys/device/platform/*/uevent files always ending up with segmentation
faults.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Varadarajan, Charulatha <charu@ti.com>
Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/gpio15xx.c
arch/arm/mach-omap1/gpio16xx.c
arch/arm/mach-omap1/gpio7xx.c
arch/arm/mach-omap2/board-rx51-peripherals.c