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

+21 -20
+18 -18
arch/arm/mach-s3c2440/mach-mini2440.c
··· 288 289 /* DM9000AEP 10/100 ethernet controller */ 290 291 - static struct resource mini2440_dm9k_resource[] __initdata = { 292 [0] = { 293 .start = MACH_MINI2440_DM9K_BASE, 294 .end = MACH_MINI2440_DM9K_BASE + 3, ··· 310 * The DM9000 has no eeprom, and it's MAC address is set by 311 * the bootloader before starting the kernel. 312 */ 313 - static struct dm9000_plat_data mini2440_dm9k_pdata __initdata = { 314 .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), 315 }; 316 317 - static struct platform_device mini2440_device_eth __initdata = { 318 .name = "dm9000", 319 .id = -1, 320 .num_resources = ARRAY_SIZE(mini2440_dm9k_resource), ··· 341 * | | +----+ +----+ 342 * ..... 343 */ 344 - static struct gpio_keys_button mini2440_buttons[] __initdata = { 345 { 346 .gpio = S3C2410_GPG(0), /* K1 */ 347 .code = KEY_F1, ··· 384 #endif 385 }; 386 387 - static struct gpio_keys_platform_data mini2440_button_data __initdata = { 388 .buttons = mini2440_buttons, 389 .nbuttons = ARRAY_SIZE(mini2440_buttons), 390 }; 391 392 - static struct platform_device mini2440_button_device __initdata = { 393 .name = "gpio-keys", 394 .id = -1, 395 .dev = { ··· 399 400 /* LEDS */ 401 402 - static struct s3c24xx_led_platdata mini2440_led1_pdata __initdata = { 403 .name = "led1", 404 .gpio = S3C2410_GPB(5), 405 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 406 .def_trigger = "heartbeat", 407 }; 408 409 - static struct s3c24xx_led_platdata mini2440_led2_pdata __initdata = { 410 .name = "led2", 411 .gpio = S3C2410_GPB(6), 412 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 413 .def_trigger = "nand-disk", 414 }; 415 416 - static struct s3c24xx_led_platdata mini2440_led3_pdata __initdata = { 417 .name = "led3", 418 .gpio = S3C2410_GPB(7), 419 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 420 .def_trigger = "mmc0", 421 }; 422 423 - static struct s3c24xx_led_platdata mini2440_led4_pdata __initdata = { 424 .name = "led4", 425 .gpio = S3C2410_GPB(8), 426 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 427 .def_trigger = "", 428 }; 429 430 - static struct s3c24xx_led_platdata mini2440_led_backlight_pdata __initdata = { 431 .name = "backlight", 432 .gpio = S3C2410_GPG(4), 433 .def_trigger = "backlight", 434 }; 435 436 - static struct platform_device mini2440_led1 __initdata = { 437 .name = "s3c24xx_led", 438 .id = 1, 439 .dev = { ··· 441 }, 442 }; 443 444 - static struct platform_device mini2440_led2 __initdata = { 445 .name = "s3c24xx_led", 446 .id = 2, 447 .dev = { ··· 449 }, 450 }; 451 452 - static struct platform_device mini2440_led3 __initdata = { 453 .name = "s3c24xx_led", 454 .id = 3, 455 .dev = { ··· 457 }, 458 }; 459 460 - static struct platform_device mini2440_led4 __initdata = { 461 .name = "s3c24xx_led", 462 .id = 4, 463 .dev = { ··· 465 }, 466 }; 467 468 - static struct platform_device mini2440_led_backlight __initdata = { 469 .name = "s3c24xx_led", 470 .id = 5, 471 .dev = { ··· 475 476 /* AUDIO */ 477 478 - static struct s3c24xx_uda134x_platform_data mini2440_audio_pins __initdata = { 479 .l3_clk = S3C2410_GPB(4), 480 .l3_mode = S3C2410_GPB(2), 481 .l3_data = S3C2410_GPB(3), 482 .model = UDA134X_UDA1341 483 }; 484 485 - static struct platform_device mini2440_audio __initdata = { 486 .name = "s3c24xx_uda134x", 487 .id = 0, 488 .dev = {
··· 288 289 /* DM9000AEP 10/100 ethernet controller */ 290 291 + static struct resource mini2440_dm9k_resource[] = { 292 [0] = { 293 .start = MACH_MINI2440_DM9K_BASE, 294 .end = MACH_MINI2440_DM9K_BASE + 3, ··· 310 * The DM9000 has no eeprom, and it's MAC address is set by 311 * the bootloader before starting the kernel. 312 */ 313 + static struct dm9000_plat_data mini2440_dm9k_pdata = { 314 .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), 315 }; 316 317 + static struct platform_device mini2440_device_eth = { 318 .name = "dm9000", 319 .id = -1, 320 .num_resources = ARRAY_SIZE(mini2440_dm9k_resource), ··· 341 * | | +----+ +----+ 342 * ..... 343 */ 344 + static struct gpio_keys_button mini2440_buttons[] = { 345 { 346 .gpio = S3C2410_GPG(0), /* K1 */ 347 .code = KEY_F1, ··· 384 #endif 385 }; 386 387 + static struct gpio_keys_platform_data mini2440_button_data = { 388 .buttons = mini2440_buttons, 389 .nbuttons = ARRAY_SIZE(mini2440_buttons), 390 }; 391 392 + static struct platform_device mini2440_button_device = { 393 .name = "gpio-keys", 394 .id = -1, 395 .dev = { ··· 399 400 /* LEDS */ 401 402 + static struct s3c24xx_led_platdata mini2440_led1_pdata = { 403 .name = "led1", 404 .gpio = S3C2410_GPB(5), 405 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 406 .def_trigger = "heartbeat", 407 }; 408 409 + static struct s3c24xx_led_platdata mini2440_led2_pdata = { 410 .name = "led2", 411 .gpio = S3C2410_GPB(6), 412 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 413 .def_trigger = "nand-disk", 414 }; 415 416 + static struct s3c24xx_led_platdata mini2440_led3_pdata = { 417 .name = "led3", 418 .gpio = S3C2410_GPB(7), 419 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 420 .def_trigger = "mmc0", 421 }; 422 423 + static struct s3c24xx_led_platdata mini2440_led4_pdata = { 424 .name = "led4", 425 .gpio = S3C2410_GPB(8), 426 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, 427 .def_trigger = "", 428 }; 429 430 + static struct s3c24xx_led_platdata mini2440_led_backlight_pdata = { 431 .name = "backlight", 432 .gpio = S3C2410_GPG(4), 433 .def_trigger = "backlight", 434 }; 435 436 + static struct platform_device mini2440_led1 = { 437 .name = "s3c24xx_led", 438 .id = 1, 439 .dev = { ··· 441 }, 442 }; 443 444 + static struct platform_device mini2440_led2 = { 445 .name = "s3c24xx_led", 446 .id = 2, 447 .dev = { ··· 449 }, 450 }; 451 452 + static struct platform_device mini2440_led3 = { 453 .name = "s3c24xx_led", 454 .id = 3, 455 .dev = { ··· 457 }, 458 }; 459 460 + static struct platform_device mini2440_led4 = { 461 .name = "s3c24xx_led", 462 .id = 4, 463 .dev = { ··· 465 }, 466 }; 467 468 + static struct platform_device mini2440_led_backlight = { 469 .name = "s3c24xx_led", 470 .id = 5, 471 .dev = { ··· 475 476 /* AUDIO */ 477 478 + static struct s3c24xx_uda134x_platform_data mini2440_audio_pins = { 479 .l3_clk = S3C2410_GPB(4), 480 .l3_mode = S3C2410_GPB(2), 481 .l3_data = S3C2410_GPB(3), 482 .model = UDA134X_UDA1341 483 }; 484 485 + static struct platform_device mini2440_audio = { 486 .name = "s3c24xx_uda134x", 487 .id = 0, 488 .dev = {
+1
arch/arm/mach-s3c6410/mach-smdk6410.c
··· 211 .supply_name = "B_PWR_5V", 212 .microvolts = 5000000, 213 .init_data = &smdk6410_b_pwr_5v_data, 214 }; 215 216 static struct platform_device smdk6410_b_pwr_5v = {
··· 211 .supply_name = "B_PWR_5V", 212 .microvolts = 5000000, 213 .init_data = &smdk6410_b_pwr_5v_data, 214 + .gpio = -EINVAL, 215 }; 216 217 static struct platform_device smdk6410_b_pwr_5v = {
+2 -2
arch/arm/plat-s3c/dev-nand.c
··· 58 return -ENOMEM; 59 } 60 61 - size = sizeof(int) * set->nr_chips; 62 - if (size) { 63 ptr = kmemdup(set->nr_map, size, GFP_KERNEL); 64 set->nr_map = ptr; 65
··· 58 return -ENOMEM; 59 } 60 61 + if (set->nr_map && set->nr_chips) { 62 + size = sizeof(int) * set->nr_chips; 63 ptr = kmemdup(set->nr_map, size, GFP_KERNEL); 64 set->nr_map = ptr; 65