提交 9ddabb67 编写于 作者: L Linus Torvalds

Merge branch 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux

* 'for-linus/samsung' of git://git.fluff.org/bjdooks/linux:
  ARM: MINI2440: Fixup __initdata usage
  ARM: MINI2440: Fix crash on boot due to improper __initdata qualifier
  ARM: SMDK6410: Specify no GPIO for B_PWR_5V regulator
  ARM: S3C: NAND: Check the existence of nr_map before copying
...@@ -288,7 +288,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = { ...@@ -288,7 +288,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
/* DM9000AEP 10/100 ethernet controller */ /* DM9000AEP 10/100 ethernet controller */
static struct resource mini2440_dm9k_resource[] __initdata = { static struct resource mini2440_dm9k_resource[] = {
[0] = { [0] = {
.start = MACH_MINI2440_DM9K_BASE, .start = MACH_MINI2440_DM9K_BASE,
.end = MACH_MINI2440_DM9K_BASE + 3, .end = MACH_MINI2440_DM9K_BASE + 3,
...@@ -310,11 +310,11 @@ static struct resource mini2440_dm9k_resource[] __initdata = { ...@@ -310,11 +310,11 @@ static struct resource mini2440_dm9k_resource[] __initdata = {
* The DM9000 has no eeprom, and it's MAC address is set by * The DM9000 has no eeprom, and it's MAC address is set by
* the bootloader before starting the kernel. * the bootloader before starting the kernel.
*/ */
static struct dm9000_plat_data mini2440_dm9k_pdata __initdata = { static struct dm9000_plat_data mini2440_dm9k_pdata = {
.flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM),
}; };
static struct platform_device mini2440_device_eth __initdata = { static struct platform_device mini2440_device_eth = {
.name = "dm9000", .name = "dm9000",
.id = -1, .id = -1,
.num_resources = ARRAY_SIZE(mini2440_dm9k_resource), .num_resources = ARRAY_SIZE(mini2440_dm9k_resource),
...@@ -341,7 +341,7 @@ static struct platform_device mini2440_device_eth __initdata = { ...@@ -341,7 +341,7 @@ static struct platform_device mini2440_device_eth __initdata = {
* | | +----+ +----+ * | | +----+ +----+
* ..... * .....
*/ */
static struct gpio_keys_button mini2440_buttons[] __initdata = { static struct gpio_keys_button mini2440_buttons[] = {
{ {
.gpio = S3C2410_GPG(0), /* K1 */ .gpio = S3C2410_GPG(0), /* K1 */
.code = KEY_F1, .code = KEY_F1,
...@@ -384,12 +384,12 @@ static struct gpio_keys_button mini2440_buttons[] __initdata = { ...@@ -384,12 +384,12 @@ static struct gpio_keys_button mini2440_buttons[] __initdata = {
#endif #endif
}; };
static struct gpio_keys_platform_data mini2440_button_data __initdata = { static struct gpio_keys_platform_data mini2440_button_data = {
.buttons = mini2440_buttons, .buttons = mini2440_buttons,
.nbuttons = ARRAY_SIZE(mini2440_buttons), .nbuttons = ARRAY_SIZE(mini2440_buttons),
}; };
static struct platform_device mini2440_button_device __initdata = { static struct platform_device mini2440_button_device = {
.name = "gpio-keys", .name = "gpio-keys",
.id = -1, .id = -1,
.dev = { .dev = {
...@@ -399,41 +399,41 @@ static struct platform_device mini2440_button_device __initdata = { ...@@ -399,41 +399,41 @@ static struct platform_device mini2440_button_device __initdata = {
/* LEDS */ /* LEDS */
static struct s3c24xx_led_platdata mini2440_led1_pdata __initdata = { static struct s3c24xx_led_platdata mini2440_led1_pdata = {
.name = "led1", .name = "led1",
.gpio = S3C2410_GPB(5), .gpio = S3C2410_GPB(5),
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
.def_trigger = "heartbeat", .def_trigger = "heartbeat",
}; };
static struct s3c24xx_led_platdata mini2440_led2_pdata __initdata = { static struct s3c24xx_led_platdata mini2440_led2_pdata = {
.name = "led2", .name = "led2",
.gpio = S3C2410_GPB(6), .gpio = S3C2410_GPB(6),
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
.def_trigger = "nand-disk", .def_trigger = "nand-disk",
}; };
static struct s3c24xx_led_platdata mini2440_led3_pdata __initdata = { static struct s3c24xx_led_platdata mini2440_led3_pdata = {
.name = "led3", .name = "led3",
.gpio = S3C2410_GPB(7), .gpio = S3C2410_GPB(7),
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
.def_trigger = "mmc0", .def_trigger = "mmc0",
}; };
static struct s3c24xx_led_platdata mini2440_led4_pdata __initdata = { static struct s3c24xx_led_platdata mini2440_led4_pdata = {
.name = "led4", .name = "led4",
.gpio = S3C2410_GPB(8), .gpio = S3C2410_GPB(8),
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
.def_trigger = "", .def_trigger = "",
}; };
static struct s3c24xx_led_platdata mini2440_led_backlight_pdata __initdata = { static struct s3c24xx_led_platdata mini2440_led_backlight_pdata = {
.name = "backlight", .name = "backlight",
.gpio = S3C2410_GPG(4), .gpio = S3C2410_GPG(4),
.def_trigger = "backlight", .def_trigger = "backlight",
}; };
static struct platform_device mini2440_led1 __initdata = { static struct platform_device mini2440_led1 = {
.name = "s3c24xx_led", .name = "s3c24xx_led",
.id = 1, .id = 1,
.dev = { .dev = {
...@@ -441,7 +441,7 @@ static struct platform_device mini2440_led1 __initdata = { ...@@ -441,7 +441,7 @@ static struct platform_device mini2440_led1 __initdata = {
}, },
}; };
static struct platform_device mini2440_led2 __initdata = { static struct platform_device mini2440_led2 = {
.name = "s3c24xx_led", .name = "s3c24xx_led",
.id = 2, .id = 2,
.dev = { .dev = {
...@@ -449,7 +449,7 @@ static struct platform_device mini2440_led2 __initdata = { ...@@ -449,7 +449,7 @@ static struct platform_device mini2440_led2 __initdata = {
}, },
}; };
static struct platform_device mini2440_led3 __initdata = { static struct platform_device mini2440_led3 = {
.name = "s3c24xx_led", .name = "s3c24xx_led",
.id = 3, .id = 3,
.dev = { .dev = {
...@@ -457,7 +457,7 @@ static struct platform_device mini2440_led3 __initdata = { ...@@ -457,7 +457,7 @@ static struct platform_device mini2440_led3 __initdata = {
}, },
}; };
static struct platform_device mini2440_led4 __initdata = { static struct platform_device mini2440_led4 = {
.name = "s3c24xx_led", .name = "s3c24xx_led",
.id = 4, .id = 4,
.dev = { .dev = {
...@@ -465,7 +465,7 @@ static struct platform_device mini2440_led4 __initdata = { ...@@ -465,7 +465,7 @@ static struct platform_device mini2440_led4 __initdata = {
}, },
}; };
static struct platform_device mini2440_led_backlight __initdata = { static struct platform_device mini2440_led_backlight = {
.name = "s3c24xx_led", .name = "s3c24xx_led",
.id = 5, .id = 5,
.dev = { .dev = {
...@@ -475,14 +475,14 @@ static struct platform_device mini2440_led_backlight __initdata = { ...@@ -475,14 +475,14 @@ static struct platform_device mini2440_led_backlight __initdata = {
/* AUDIO */ /* AUDIO */
static struct s3c24xx_uda134x_platform_data mini2440_audio_pins __initdata = { static struct s3c24xx_uda134x_platform_data mini2440_audio_pins = {
.l3_clk = S3C2410_GPB(4), .l3_clk = S3C2410_GPB(4),
.l3_mode = S3C2410_GPB(2), .l3_mode = S3C2410_GPB(2),
.l3_data = S3C2410_GPB(3), .l3_data = S3C2410_GPB(3),
.model = UDA134X_UDA1341 .model = UDA134X_UDA1341
}; };
static struct platform_device mini2440_audio __initdata = { static struct platform_device mini2440_audio = {
.name = "s3c24xx_uda134x", .name = "s3c24xx_uda134x",
.id = 0, .id = 0,
.dev = { .dev = {
......
...@@ -211,6 +211,7 @@ static struct fixed_voltage_config smdk6410_b_pwr_5v_pdata = { ...@@ -211,6 +211,7 @@ static struct fixed_voltage_config smdk6410_b_pwr_5v_pdata = {
.supply_name = "B_PWR_5V", .supply_name = "B_PWR_5V",
.microvolts = 5000000, .microvolts = 5000000,
.init_data = &smdk6410_b_pwr_5v_data, .init_data = &smdk6410_b_pwr_5v_data,
.gpio = -EINVAL,
}; };
static struct platform_device smdk6410_b_pwr_5v = { static struct platform_device smdk6410_b_pwr_5v = {
......
...@@ -58,8 +58,8 @@ static int __init s3c_nand_copy_set(struct s3c2410_nand_set *set) ...@@ -58,8 +58,8 @@ static int __init s3c_nand_copy_set(struct s3c2410_nand_set *set)
return -ENOMEM; return -ENOMEM;
} }
size = sizeof(int) * set->nr_chips; if (set->nr_map && set->nr_chips) {
if (size) { size = sizeof(int) * set->nr_chips;
ptr = kmemdup(set->nr_map, size, GFP_KERNEL); ptr = kmemdup(set->nr_map, size, GFP_KERNEL);
set->nr_map = ptr; set->nr_map = ptr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册