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 6d3163ce86
, "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>
This commit is contained in:

committed by
Tony Lindgren

parent
b0af8dfdd6
commit
07ad6ab3d7
@@ -215,7 +215,7 @@ static struct omap_kp_platform_data ams_delta_kp_data __initdata = {
|
||||
.delay = 9,
|
||||
};
|
||||
|
||||
static struct platform_device ams_delta_kp_device __initdata = {
|
||||
static struct platform_device ams_delta_kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
@@ -225,12 +225,12 @@ static struct platform_device ams_delta_kp_device __initdata = {
|
||||
.resource = ams_delta_kp_resources,
|
||||
};
|
||||
|
||||
static struct platform_device ams_delta_lcd_device __initdata = {
|
||||
static struct platform_device ams_delta_lcd_device = {
|
||||
.name = "lcd_ams_delta",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device ams_delta_led_device __initdata = {
|
||||
static struct platform_device ams_delta_led_device = {
|
||||
.name = "ams-delta-led",
|
||||
.id = -1
|
||||
};
|
||||
@@ -267,7 +267,7 @@ static struct soc_camera_link ams_delta_iclink = {
|
||||
.power = ams_delta_camera_power,
|
||||
};
|
||||
|
||||
static struct platform_device ams_delta_camera_device __initdata = {
|
||||
static struct platform_device ams_delta_camera_device = {
|
||||
.name = "soc-camera-pdrv",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
|
Reference in New Issue
Block a user