diff options
| author | Paul Parsons <lost.distance@yahoo.com> | 2012-06-29 08:01:31 -0400 |
|---|---|---|
| committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-07-01 03:29:12 -0400 |
| commit | 759af179c72005e61a4dd6dcf909320a134bfeee (patch) | |
| tree | 928d2ff1e4ffd9a201b9d8c903f0dfcaafc7a894 | |
| parent | a2f81c0eb40e1f5e7eff016322f3f0e5a2e68b5e (diff) | |
ARM: pxa: hx4700: Use DEFINE_RES_* macros consistently
This patch replaces the remaining inline struct resource definitions
with equivalent DEFINE_RES_* macro calls.
The source file is reduced in size; the object file is unchanged.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
| -rw-r--r-- | arch/arm/mach-pxa/hx4700.c | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index d09da6a746b8..9a9d3c7b7fd8 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
| @@ -288,27 +288,11 @@ static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = { | |||
| 288 | 288 | ||
| 289 | static struct resource asic3_resources[] = { | 289 | static struct resource asic3_resources[] = { |
| 290 | /* GPIO part */ | 290 | /* GPIO part */ |
| 291 | [0] = { | 291 | [0] = DEFINE_RES_MEM(ASIC3_PHYS, ASIC3_MAP_SIZE_16BIT), |
| 292 | .start = ASIC3_PHYS, | 292 | [1] = DEFINE_RES_IRQ(PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ)), |
| 293 | .end = ASIC3_PHYS + ASIC3_MAP_SIZE_16BIT - 1, | ||
| 294 | .flags = IORESOURCE_MEM, | ||
| 295 | }, | ||
| 296 | [1] = { | ||
| 297 | .start = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ), | ||
| 298 | .end = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ), | ||
| 299 | .flags = IORESOURCE_IRQ, | ||
| 300 | }, | ||
| 301 | /* SD part */ | 293 | /* SD part */ |
| 302 | [2] = { | 294 | [2] = DEFINE_RES_MEM(ASIC3_SD_PHYS, ASIC3_MAP_SIZE_16BIT), |
| 303 | .start = ASIC3_SD_PHYS, | 295 | [3] = DEFINE_RES_IRQ(PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ)), |
| 304 | .end = ASIC3_SD_PHYS + ASIC3_MAP_SIZE_16BIT - 1, | ||
| 305 | .flags = IORESOURCE_MEM, | ||
| 306 | }, | ||
| 307 | [3] = { | ||
| 308 | .start = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ), | ||
| 309 | .end = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ), | ||
| 310 | .flags = IORESOURCE_IRQ, | ||
| 311 | }, | ||
| 312 | }; | 296 | }; |
| 313 | 297 | ||
| 314 | static struct asic3_platform_data asic3_platform_data = { | 298 | static struct asic3_platform_data asic3_platform_data = { |
| @@ -335,11 +319,7 @@ static struct platform_device asic3 = { | |||
| 335 | */ | 319 | */ |
| 336 | 320 | ||
| 337 | static struct resource egpio_resources[] = { | 321 | static struct resource egpio_resources[] = { |
| 338 | [0] = { | 322 | [0] = DEFINE_RES_MEM(PXA_CS5_PHYS, 0x4), |
| 339 | .start = PXA_CS5_PHYS, | ||
| 340 | .end = PXA_CS5_PHYS + 0x4 - 1, | ||
| 341 | .flags = IORESOURCE_MEM, | ||
| 342 | }, | ||
| 343 | }; | 323 | }; |
| 344 | 324 | ||
| 345 | static struct htc_egpio_chip egpio_chips[] = { | 325 | static struct htc_egpio_chip egpio_chips[] = { |
| @@ -529,11 +509,7 @@ static struct w100fb_mach_info w3220_info = { | |||
| 529 | }; | 509 | }; |
| 530 | 510 | ||
| 531 | static struct resource w3220_resources[] = { | 511 | static struct resource w3220_resources[] = { |
| 532 | [0] = { | 512 | [0] = DEFINE_RES_MEM(ATI_W3220_PHYS, SZ_16M), |
| 533 | .start = ATI_W3220_PHYS, | ||
| 534 | .end = ATI_W3220_PHYS + 0x00ffffff, | ||
| 535 | .flags = IORESOURCE_MEM, | ||
| 536 | }, | ||
| 537 | }; | 513 | }; |
| 538 | 514 | ||
| 539 | static struct platform_device w3220 = { | 515 | static struct platform_device w3220 = { |
| @@ -675,20 +651,12 @@ static struct pda_power_pdata power_supply_info = { | |||
| 675 | }; | 651 | }; |
| 676 | 652 | ||
| 677 | static struct resource power_supply_resources[] = { | 653 | static struct resource power_supply_resources[] = { |
| 678 | [0] = { | 654 | [0] = DEFINE_RES_NAMED(PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), 1, "ac", |
| 679 | .name = "ac", | 655 | IORESOURCE_IRQ | |
| 680 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | 656 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE), |
| 681 | IORESOURCE_IRQ_LOWEDGE, | 657 | [1] = DEFINE_RES_NAMED(PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), 1, "usb", |
| 682 | .start = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), | 658 | IORESOURCE_IRQ | |
| 683 | .end = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), | 659 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE), |
| 684 | }, | ||
| 685 | [1] = { | ||
| 686 | .name = "usb", | ||
| 687 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | ||
| 688 | IORESOURCE_IRQ_LOWEDGE, | ||
| 689 | .start = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), | ||
| 690 | .end = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), | ||
| 691 | }, | ||
| 692 | }; | 660 | }; |
| 693 | 661 | ||
| 694 | static struct platform_device power_supply = { | 662 | static struct platform_device power_supply = { |
