1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-10-04 07:04:10 +03:00

ar71xx: fix whitespaces nits

(build error has been fixed - juhosg)

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23975 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2010-11-12 18:50:29 +00:00
parent fd4246150d
commit b6dbd83901
58 changed files with 340 additions and 340 deletions

View File

@ -33,7 +33,7 @@ static struct ar71xx_pci_irq ap91_pci_irqs[] __initdata = {
static int ap91_pci_plat_dev_init(struct pci_dev *dev) static int ap91_pci_plat_dev_init(struct pci_dev *dev)
{ {
switch(PCI_SLOT(dev->devfn)) { switch (PCI_SLOT(dev->devfn)) {
case 0: case 0:
dev->dev.platform_data = &ap91_wmac_data; dev->dev.platform_data = &ap91_wmac_data;
break; break;

View File

@ -28,20 +28,20 @@ static char ap94_wmac0_mac[6];
static char ap94_wmac1_mac[6]; static char ap94_wmac1_mac[6];
static struct ar71xx_pci_irq ap94_pci_irqs[] __initdata = { static struct ar71xx_pci_irq ap94_pci_irqs[] __initdata = {
{ {
.slot = 0, .slot = 0,
.pin = 1, .pin = 1,
.irq = AR71XX_PCI_IRQ_DEV0, .irq = AR71XX_PCI_IRQ_DEV0,
}, { }, {
.slot = 1, .slot = 1,
.pin = 1, .pin = 1,
.irq = AR71XX_PCI_IRQ_DEV1, .irq = AR71XX_PCI_IRQ_DEV1,
} }
}; };
static int ap94_pci_plat_dev_init(struct pci_dev *dev) static int ap94_pci_plat_dev_init(struct pci_dev *dev)
{ {
switch(PCI_SLOT(dev->devfn)) { switch (PCI_SLOT(dev->devfn)) {
case 17: case 17:
dev->dev.platform_data = &ap94_wmac0_data; dev->dev.platform_data = &ap94_wmac0_data;
break; break;

View File

@ -271,7 +271,7 @@ asmlinkage void plat_irq_dispatch(void)
void __init arch_init_irq(void) void __init arch_init_irq(void)
{ {
switch(ar71xx_soc) { switch (ar71xx_soc) {
case AR71XX_SOC_AR7240: case AR71XX_SOC_AR7240:
case AR71XX_SOC_AR7241: case AR71XX_SOC_AR7241:
case AR71XX_SOC_AR7242: case AR71XX_SOC_AR7242:

View File

@ -39,19 +39,19 @@ static struct mtd_partition ap81_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "u-boot-env", .name = "u-boot-env",
.offset = 0x040000, .offset = 0x040000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x050000, .offset = 0x050000,
.size = 0x500000, .size = 0x500000,
} , { }, {
.name = "uImage", .name = "uImage",
.offset = 0x550000, .offset = 0x550000,
.size = 0x100000, .size = 0x100000,
} , { }, {
.name = "ART", .name = "ART",
.offset = 0x650000, .offset = 0x650000,
.size = 0x1b0000, .size = 0x1b0000,
@ -62,8 +62,8 @@ static struct mtd_partition ap81_partitions[] = {
static struct flash_platform_data ap81_flash_data = { static struct flash_platform_data ap81_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = ap81_partitions, .parts = ap81_partitions,
.nr_parts = ARRAY_SIZE(ap81_partitions), .nr_parts = ARRAY_SIZE(ap81_partitions),
#endif #endif
}; };
@ -95,7 +95,7 @@ static struct gpio_button ap81_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = AP81_GPIO_BTN_SW1, .gpio = AP81_GPIO_BTN_SW1,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "sw4", .desc = "sw4",
.type = EV_KEY, .type = EV_KEY,
.code = BTN_1, .code = BTN_1,

View File

@ -47,25 +47,25 @@ static struct mtd_partition ap83_flash_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "u-boot-env", .name = "u-boot-env",
.offset = 0x040000, .offset = 0x040000,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x060000, .offset = 0x060000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x1a0000, .offset = 0x1a0000,
.size = 0x650000, .size = 0x650000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x7f0000, .offset = 0x7f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x060000, .offset = 0x060000,
.size = 0x790000, .size = 0x790000,
@ -76,8 +76,8 @@ static struct mtd_partition ap83_flash_partitions[] = {
static struct ar91xx_flash_platform_data ap83_flash_data = { static struct ar91xx_flash_platform_data ap83_flash_data = {
.width = 2, .width = 2,
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = ap83_flash_partitions, .parts = ap83_flash_partitions,
.nr_parts = ARRAY_SIZE(ap83_flash_partitions), .nr_parts = ARRAY_SIZE(ap83_flash_partitions),
#endif #endif
}; };
@ -123,7 +123,7 @@ static struct gpio_button ap83_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = AP83_GPIO_BTN_RESET, .gpio = AP83_GPIO_BTN_RESET,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "jumpstart", .desc = "jumpstart",
.type = EV_KEY, .type = EV_KEY,
.code = KEY_WPS_BUTTON, .code = KEY_WPS_BUTTON,
@ -231,7 +231,7 @@ static void __init ap83_generic_setup(void)
static void __init ap83_040_setup(void) static void __init ap83_040_setup(void)
{ {
ap83_flash_data.is_shared=1; ap83_flash_data.is_shared = 1;
ap83_generic_setup(); ap83_generic_setup();
platform_device_register(&ap83_040_spi_device); platform_device_register(&ap83_040_spi_device);
} }

View File

@ -51,20 +51,20 @@ static struct mtd_partition ap96_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x030000, .size = 0x030000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "env", .name = "env",
.offset = 0x030000, .offset = 0x030000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x040000, .offset = 0x040000,
.size = 0x600000, .size = 0x600000,
} , { }, {
.name = "uImage", .name = "uImage",
.offset = 0x640000, .offset = 0x640000,
.size = 0x1b0000, .size = 0x1b0000,
} , { }, {
.name = "caldata", .name = "caldata",
.offset = 0x7f0000, .offset = 0x7f0000,
.size = 0x010000, .size = 0x010000,
@ -75,8 +75,8 @@ static struct mtd_partition ap96_partitions[] = {
static struct flash_platform_data ap96_flash_data = { static struct flash_platform_data ap96_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = ap96_partitions, .parts = ap96_partitions,
.nr_parts = ARRAY_SIZE(ap96_partitions), .nr_parts = ARRAY_SIZE(ap96_partitions),
#endif #endif
}; };
@ -163,12 +163,12 @@ static void __init ap96_setup(void)
ar71xx_add_device_m25p80(&ap96_flash_data); ar71xx_add_device_m25p80(&ap96_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap96_leds_gpio), ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap96_leds_gpio),
ap96_leds_gpio); ap96_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, AP96_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, AP96_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(ap96_gpio_buttons), ARRAY_SIZE(ap96_gpio_buttons),
ap96_gpio_buttons); ap96_gpio_buttons);
ap94_pci_init(art + AP96_CALDATA0_OFFSET, ap94_pci_init(art + AP96_CALDATA0_OFFSET,
art + AP96_WMAC0_MAC_OFFSET, art + AP96_WMAC0_MAC_OFFSET,

View File

@ -72,8 +72,8 @@ static struct mtd_partition dir_600_a1_partitions[] = {
static struct flash_platform_data dir_600_a1_flash_data = { static struct flash_platform_data dir_600_a1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = dir_600_a1_partitions, .parts = dir_600_a1_partitions,
.nr_parts = ARRAY_SIZE(dir_600_a1_partitions), .nr_parts = ARRAY_SIZE(dir_600_a1_partitions),
#endif #endif
}; };
@ -117,7 +117,7 @@ static void __init dir_600_a1_setup(void)
u8 *mac = NULL; u8 *mac = NULL;
if (nvram_parse_mac_addr(nvram, DIR_600_A1_NVRAM_SIZE, if (nvram_parse_mac_addr(nvram, DIR_600_A1_NVRAM_SIZE,
"lan_mac=", mac_buff) == 0) { "lan_mac=", mac_buff) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
mac = mac_buff; mac = mac_buff;

View File

@ -47,24 +47,24 @@ static struct mtd_partition dir_615c1_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "config", .name = "config",
.offset = 0x020000, .offset = 0x020000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x030000, .offset = 0x030000,
.size = 0x0d0000, .size = 0x0d0000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x100000, .offset = 0x100000,
.size = 0x2f0000, .size = 0x2f0000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x030000, .offset = 0x030000,
.size = 0x3c0000, .size = 0x3c0000,
@ -74,8 +74,8 @@ static struct mtd_partition dir_615c1_partitions[] = {
static struct flash_platform_data dir_615c1_flash_data = { static struct flash_platform_data dir_615c1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = dir_615c1_partitions, .parts = dir_615c1_partitions,
.nr_parts = ARRAY_SIZE(dir_615c1_partitions), .nr_parts = ARRAY_SIZE(dir_615c1_partitions),
#endif #endif
}; };
@ -96,13 +96,13 @@ static struct gpio_led dir_615c1_leds_gpio[] __initdata = {
.name = "dir-615c1:green:wancpu", .name = "dir-615c1:green:wancpu",
.gpio = DIR_615C1_GPIO_LED_GREEN_WANCPU, .gpio = DIR_615C1_GPIO_LED_GREEN_WANCPU,
.active_low = 1, .active_low = 1,
}, { }, {
.name = "dir-615c1:green:wlan", .name = "dir-615c1:green:wlan",
.gpio = DIR_615C1_GPIO_LED_GREEN_WLAN, .gpio = DIR_615C1_GPIO_LED_GREEN_WLAN,
.active_low = 1, .active_low = 1,
}, { }, {
.name = "dir-615c1:green:status", .name = "dir-615c1:green:status",
.gpio = DIR_615C1_GPIO_LED_GREEN_STATUS, .gpio = DIR_615C1_GPIO_LED_GREEN_STATUS,
.active_low = 1, .active_low = 1,
}, { }, {
.name = "dir-615c1:orange:wan", .name = "dir-615c1:orange:wan",
@ -141,7 +141,7 @@ static void __init dir_615c1_setup(void)
u8 *wlan_mac = NULL; u8 *wlan_mac = NULL;
if (nvram_parse_mac_addr(config, DIR_615C1_CONFIG_SIZE, if (nvram_parse_mac_addr(config, DIR_615C1_CONFIG_SIZE,
"lan_mac=", mac) == 0) { "lan_mac=", mac) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
wlan_mac = mac; wlan_mac = mac;

View File

@ -54,21 +54,21 @@ static struct mtd_partition dir825b1_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "config", .name = "config",
.offset = 0x040000, .offset = 0x040000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x050000, .offset = 0x050000,
.size = 0x610000, .size = 0x610000,
} , { }, {
.name = "caldata", .name = "caldata",
.offset = 0x660000, .offset = 0x660000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "unknown", .name = "unknown",
.offset = 0x670000, .offset = 0x670000,
.size = 0x190000, .size = 0x190000,
@ -79,8 +79,8 @@ static struct mtd_partition dir825b1_partitions[] = {
static struct flash_platform_data dir825b1_flash_data = { static struct flash_platform_data dir825b1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = dir825b1_partitions, .parts = dir825b1_partitions,
.nr_parts = ARRAY_SIZE(dir825b1_partitions), .nr_parts = ARRAY_SIZE(dir825b1_partitions),
#endif #endif
}; };
@ -120,7 +120,7 @@ static struct gpio_button dir825b1_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = DIR825B1_GPIO_BTN_RESET, .gpio = DIR825B1_GPIO_BTN_RESET,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "powersave", .desc = "powersave",
.type = EV_KEY, .type = EV_KEY,
.code = BTN_1, .code = BTN_1,

View File

@ -45,20 +45,20 @@ static u16 eap7660d_wmac0_eeprom[ATH5K_PLAT_EEP_MAX_WORDS];
static u16 eap7660d_wmac1_eeprom[ATH5K_PLAT_EEP_MAX_WORDS]; static u16 eap7660d_wmac1_eeprom[ATH5K_PLAT_EEP_MAX_WORDS];
static struct ar71xx_pci_irq eap7660d_pci_irqs[] __initdata = { static struct ar71xx_pci_irq eap7660d_pci_irqs[] __initdata = {
{ {
.slot = 0, .slot = 0,
.pin = 1, .pin = 1,
.irq = AR71XX_PCI_IRQ_DEV0, .irq = AR71XX_PCI_IRQ_DEV0,
}, { }, {
.slot = 1, .slot = 1,
.pin = 1, .pin = 1,
.irq = AR71XX_PCI_IRQ_DEV1, .irq = AR71XX_PCI_IRQ_DEV1,
} }
}; };
static int eap7660d_pci_plat_dev_init(struct pci_dev *dev) static int eap7660d_pci_plat_dev_init(struct pci_dev *dev)
{ {
switch(PCI_SLOT(dev->devfn)) { switch (PCI_SLOT(dev->devfn)) {
case 17: case 17:
dev->dev.platform_data = &eap7660d_wmac0_data; dev->dev.platform_data = &eap7660d_wmac0_data;
break; break;
@ -72,7 +72,7 @@ static int eap7660d_pci_plat_dev_init(struct pci_dev *dev)
} }
void __init eap7660d_pci_init(u8 *cal_data0, u8 *mac_addr0, void __init eap7660d_pci_init(u8 *cal_data0, u8 *mac_addr0,
u8 *cal_data1, u8 *mac_addr1) u8 *cal_data1, u8 *mac_addr1)
{ {
if (cal_data0 && *cal_data0 == 0xa55a) { if (cal_data0 && *cal_data0 == 0xa55a) {
memcpy(eap7660d_wmac0_eeprom, cal_data0, memcpy(eap7660d_wmac0_eeprom, cal_data0,

View File

@ -72,8 +72,8 @@ static void __init jwap003_init(void)
ar71xx_add_device_usb(); ar71xx_add_device_usb();
ar71xx_add_device_gpio_buttons(-1, JWAP003_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, JWAP003_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(jwap003_gpio_buttons), ARRAY_SIZE(jwap003_gpio_buttons),
jwap003_gpio_buttons); jwap003_gpio_buttons);
pb42_pci_init(); pb42_pci_init();
} }

View File

@ -41,24 +41,24 @@ static struct mtd_partition mzk_w04nu_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "u-boot-env", .name = "u-boot-env",
.offset = 0x040000, .offset = 0x040000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x050000, .offset = 0x050000,
.size = 0x160000, .size = 0x160000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x1b0000, .offset = 0x1b0000,
.size = 0x630000, .size = 0x630000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x7e0000, .offset = 0x7e0000,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x050000, .offset = 0x050000,
.size = 0x790000, .size = 0x790000,
@ -68,8 +68,8 @@ static struct mtd_partition mzk_w04nu_partitions[] = {
static struct flash_platform_data mzk_w04nu_flash_data = { static struct flash_platform_data mzk_w04nu_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = mzk_w04nu_partitions, .parts = mzk_w04nu_partitions,
.nr_parts = ARRAY_SIZE(mzk_w04nu_partitions), .nr_parts = ARRAY_SIZE(mzk_w04nu_partitions),
#endif #endif
}; };

View File

@ -40,24 +40,24 @@ static struct mtd_partition mzk_w300nh_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "u-boot-env", .name = "u-boot-env",
.offset = 0x040000, .offset = 0x040000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x050000, .offset = 0x050000,
.size = 0x160000, .size = 0x160000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x1b0000, .offset = 0x1b0000,
.size = 0x630000, .size = 0x630000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x7e0000, .offset = 0x7e0000,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x050000, .offset = 0x050000,
.size = 0x790000, .size = 0x790000,
@ -67,8 +67,8 @@ static struct mtd_partition mzk_w300nh_partitions[] = {
static struct flash_platform_data mzk_w300nh_flash_data = { static struct flash_platform_data mzk_w300nh_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = mzk_w300nh_partitions, .parts = mzk_w300nh_partitions,
.nr_parts = ARRAY_SIZE(mzk_w300nh_partitions), .nr_parts = ARRAY_SIZE(mzk_w300nh_partitions),
#endif #endif
}; };
@ -146,11 +146,11 @@ static void __init mzk_w300nh_setup(void)
ar71xx_add_device_m25p80(&mzk_w300nh_flash_data); ar71xx_add_device_m25p80(&mzk_w300nh_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w300nh_leds_gpio), ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w300nh_leds_gpio),
mzk_w300nh_leds_gpio); mzk_w300nh_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, MZK_W04NU_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, MZK_W04NU_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(mzk_w300nh_gpio_buttons), ARRAY_SIZE(mzk_w300nh_gpio_buttons),
mzk_w300nh_gpio_buttons); mzk_w300nh_gpio_buttons);
ar913x_add_device_wmac(eeprom, NULL); ar913x_add_device_wmac(eeprom, NULL);
} }

View File

@ -55,28 +55,28 @@ static struct mtd_partition nbg460n_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "U-Boot Config", .name = "U-Boot Config",
.offset = 0x010000, .offset = 0x010000,
.size = 0x030000, .size = 0x030000,
} , { }, {
.name = "U-Boot", .name = "U-Boot",
.offset = 0x040000, .offset = 0x040000,
.size = 0x030000, .size = 0x030000,
} , { }, {
.name = "linux", .name = "linux",
.offset = 0x070000, .offset = 0x070000,
.size = 0x0e0000, .size = 0x0e0000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x150000, .offset = 0x150000,
.size = 0x2a0000, .size = 0x2a0000,
} , { }, {
.name = "CalibData", .name = "CalibData",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x070000, .offset = 0x070000,
.size = 0x380000, .size = 0x380000,
@ -86,8 +86,8 @@ static struct mtd_partition nbg460n_partitions[] = {
static struct flash_platform_data nbg460n_flash_data = { static struct flash_platform_data nbg460n_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = nbg460n_partitions, .parts = nbg460n_partitions,
.nr_parts = ARRAY_SIZE(nbg460n_partitions), .nr_parts = ARRAY_SIZE(nbg460n_partitions),
#endif #endif
}; };
@ -165,8 +165,8 @@ static void __devinit nbg460n_i2c_init(void)
static struct rtl8366s_platform_data nbg460n_rtl8366s_data = { static struct rtl8366s_platform_data nbg460n_rtl8366s_data = {
.gpio_sda = NBG460N_GPIO_RTL8366_SDA, .gpio_sda = NBG460N_GPIO_RTL8366_SDA,
.gpio_sck = NBG460N_GPIO_RTL8366_SCK, .gpio_sck = NBG460N_GPIO_RTL8366_SCK,
}; };
static struct platform_device nbg460n_rtl8366s_device = { static struct platform_device nbg460n_rtl8366s_device = {
@ -179,7 +179,7 @@ static struct platform_device nbg460n_rtl8366s_device = {
static void __init nbg460n_setup(void) static void __init nbg460n_setup(void)
{ {
/* end of bootloader sector contains mac address*/ /* end of bootloader sector contains mac address */
u8 *mac = (u8 *) KSEG1ADDR(0x1fc0fff8); u8 *mac = (u8 *) KSEG1ADDR(0x1fc0fff8);
/* last sector contains wlan calib data */ /* last sector contains wlan calib data */
u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);

View File

@ -31,7 +31,7 @@ static struct gpio_button pb42_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = PB42_GPIO_BTN_SW4, .gpio = PB42_GPIO_BTN_SW4,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "sw5", .desc = "sw5",
.type = EV_KEY, .type = EV_KEY,
.code = BTN_1, .code = BTN_1,
@ -64,8 +64,8 @@ static void __init pb42_init(void)
ar71xx_add_device_eth(1); ar71xx_add_device_eth(1);
ar71xx_add_device_gpio_buttons(-1, PB42_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, PB42_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(pb42_gpio_buttons), ARRAY_SIZE(pb42_gpio_buttons),
pb42_gpio_buttons); pb42_gpio_buttons);
pb42_pci_init(); pb42_pci_init();
} }

View File

@ -98,7 +98,7 @@ static struct gpio_button pb44_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = PB44_GPIO_SW_RESET, .gpio = PB44_GPIO_SW_RESET,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "jumpstart", .desc = "jumpstart",
.type = EV_KEY, .type = EV_KEY,
.code = KEY_WPS_BUTTON, .code = KEY_WPS_BUTTON,
@ -192,7 +192,7 @@ static void __init pb44_init(void)
pb42_pci_init(); pb42_pci_init();
i2c_register_board_info(0, pb44_i2c_board_info, i2c_register_board_info(0, pb44_i2c_board_info,
ARRAY_SIZE(pb44_i2c_board_info)); ARRAY_SIZE(pb44_i2c_board_info));
platform_device_register(&pb44_i2c_gpio_device); platform_device_register(&pb44_i2c_gpio_device);
@ -200,10 +200,10 @@ static void __init pb44_init(void)
platform_device_register(&pb44_spi_device); platform_device_register(&pb44_spi_device);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(pb44_leds_gpio), ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(pb44_leds_gpio),
pb44_leds_gpio); pb44_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, 20, ARRAY_SIZE(pb44_gpio_buttons), ar71xx_add_device_gpio_buttons(-1, 20, ARRAY_SIZE(pb44_gpio_buttons),
pb44_gpio_buttons); pb44_gpio_buttons);
} }
MIPS_MACHINE(AR71XX_MACH_PB44, "PB44", "Atheros PB44", pb44_init); MIPS_MACHINE(AR71XX_MACH_PB44, "PB44", "Atheros PB44", pb44_init);

View File

@ -28,19 +28,19 @@ static struct mtd_partition pb92_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "u-boot-env", .name = "u-boot-env",
.offset = 0x040000, .offset = 0x040000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x050000, .offset = 0x050000,
.size = 0x2b0000, .size = 0x2b0000,
} , { }, {
.name = "uImage", .name = "uImage",
.offset = 0x300000, .offset = 0x300000,
.size = 0x0e0000, .size = 0x0e0000,
} , { }, {
.name = "ART", .name = "ART",
.offset = 0x3e0000, .offset = 0x3e0000,
.size = 0x020000, .size = 0x020000,
@ -51,8 +51,8 @@ static struct mtd_partition pb92_partitions[] = {
static struct flash_platform_data pb92_flash_data = { static struct flash_platform_data pb92_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = pb92_partitions, .parts = pb92_partitions,
.nr_parts = ARRAY_SIZE(pb92_partitions), .nr_parts = ARRAY_SIZE(pb92_partitions),
#endif #endif
}; };
@ -70,7 +70,7 @@ static struct gpio_button pb92_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = PB92_GPIO_BTN_SW4, .gpio = PB92_GPIO_BTN_SW4,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "sw5", .desc = "sw5",
.type = EV_KEY, .type = EV_KEY,
.code = BTN_1, .code = BTN_1,
@ -101,8 +101,8 @@ static void __init pb92_init(void)
ar71xx_add_device_eth(1); ar71xx_add_device_eth(1);
ar71xx_add_device_gpio_buttons(-1, PB92_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, PB92_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(pb92_gpio_buttons), ARRAY_SIZE(pb92_gpio_buttons),
pb92_gpio_buttons); pb92_gpio_buttons);
pb9x_pci_init(); pb9x_pci_init();
} }

View File

@ -138,9 +138,9 @@ static struct mtd_partition rb4xx_partitions[] = {
#endif /* CONFIG_MTD_PARTITIONS */ #endif /* CONFIG_MTD_PARTITIONS */
static struct flash_platform_data rb4xx_flash_data = { static struct flash_platform_data rb4xx_flash_data = {
.type = "pm25lv512", .type = "pm25lv512",
.parts = rb4xx_partitions, .parts = rb4xx_partitions,
.nr_parts = rb4xx_num_partitions, .nr_parts = rb4xx_num_partitions,
}; };
static struct rb4xx_cpld_platform_data rb4xx_cpld_data = { static struct rb4xx_cpld_platform_data rb4xx_cpld_data = {
@ -196,7 +196,7 @@ static struct platform_device rb4xx_spi_device = {
static void __init rb4xx_generic_setup(void) static void __init rb4xx_generic_setup(void)
{ {
ar71xx_gpio_function_enable(AR71XX_GPIO_FUNC_SPI_CS1_EN | ar71xx_gpio_function_enable(AR71XX_GPIO_FUNC_SPI_CS1_EN |
AR71XX_GPIO_FUNC_SPI_CS2_EN); AR71XX_GPIO_FUNC_SPI_CS2_EN);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(rb4xx_leds_gpio), ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(rb4xx_leds_gpio),
rb4xx_leds_gpio); rb4xx_leds_gpio);

View File

@ -103,7 +103,7 @@ int rb750_latch_change(u32 mask_clr, u32 mask_set)
ret = 1; ret = 1;
unlock: unlock:
spin_unlock_irqrestore(&lock, flags); spin_unlock_irqrestore(&lock, flags);
return ret; return ret;
} }

View File

@ -40,24 +40,24 @@ static struct mtd_partition tew_632brp_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "config", .name = "config",
.offset = 0x020000, .offset = 0x020000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x030000, .offset = 0x030000,
.size = 0x0d0000, .size = 0x0d0000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x100000, .offset = 0x100000,
.size = 0x2f0000, .size = 0x2f0000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x030000, .offset = 0x030000,
.size = 0x3c0000, .size = 0x3c0000,
@ -67,8 +67,8 @@ static struct mtd_partition tew_632brp_partitions[] = {
static struct flash_platform_data tew_632brp_flash_data = { static struct flash_platform_data tew_632brp_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = tew_632brp_partitions, .parts = tew_632brp_partitions,
.nr_parts = ARRAY_SIZE(tew_632brp_partitions), .nr_parts = ARRAY_SIZE(tew_632brp_partitions),
#endif #endif
}; };
@ -117,7 +117,7 @@ static void __init tew_632brp_setup(void)
u8 *wlan_mac = NULL; u8 *wlan_mac = NULL;
if (nvram_parse_mac_addr(config, TEW_632BRP_CONFIG_SIZE, if (nvram_parse_mac_addr(config, TEW_632BRP_CONFIG_SIZE,
"lan_mac=", mac) == 0) { "lan_mac=", mac) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
wlan_mac = mac; wlan_mac = mac;

View File

@ -40,20 +40,20 @@ static struct mtd_partition tl_mr3420_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x020000, .offset = 0x020000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x160000, .offset = 0x160000,
.size = 0x290000, .size = 0x290000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x020000, .offset = 0x020000,
.size = 0x3d0000, .size = 0x3d0000,
@ -66,8 +66,8 @@ static struct mtd_partition tl_mr3420_partitions[] = {
#endif /* CONFIG_MTD_PARTITIONS */ #endif /* CONFIG_MTD_PARTITIONS */
static struct flash_platform_data tl_mr3420_flash_data = { static struct flash_platform_data tl_mr3420_flash_data = {
.parts = tl_mr3420_partitions, .parts = tl_mr3420_partitions,
.nr_parts = tl_mr3420_num_partitions, .nr_parts = tl_mr3420_num_partitions,
}; };
static struct gpio_led tl_mr3420_leds_gpio[] __initdata = { static struct gpio_led tl_mr3420_leds_gpio[] __initdata = {
@ -110,7 +110,7 @@ static void __init tl_mr3420_setup(void)
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
/* enable power for the USB port */ /* enable power for the USB port */
gpio_request(TL_MR3420_GPIO_USB_POWER,"USB power"); gpio_request(TL_MR3420_GPIO_USB_POWER, "USB power");
gpio_direction_output(TL_MR3420_GPIO_USB_POWER, 1); gpio_direction_output(TL_MR3420_GPIO_USB_POWER, 1);
ar71xx_add_device_m25p80(&tl_mr3420_flash_data); ar71xx_add_device_m25p80(&tl_mr3420_flash_data);

View File

@ -36,20 +36,20 @@ static struct mtd_partition tl_wa901nd_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x020000, .offset = 0x020000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x160000, .offset = 0x160000,
.size = 0x290000, .size = 0x290000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x020000, .offset = 0x020000,
.size = 0x3d0000, .size = 0x3d0000,
@ -59,8 +59,8 @@ static struct mtd_partition tl_wa901nd_partitions[] = {
static struct flash_platform_data tl_wa901nd_flash_data = { static struct flash_platform_data tl_wa901nd_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = tl_wa901nd_partitions, .parts = tl_wa901nd_partitions,
.nr_parts = ARRAY_SIZE(tl_wa901nd_partitions), .nr_parts = ARRAY_SIZE(tl_wa901nd_partitions),
#endif #endif
}; };
@ -116,14 +116,14 @@ static void __init tl_wa901nd_setup(void)
ar71xx_add_device_m25p80(&tl_wa901nd_flash_data); ar71xx_add_device_m25p80(&tl_wa901nd_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_leds_gpio), ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_leds_gpio),
tl_wa901nd_leds_gpio); tl_wa901nd_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, TL_WA901ND_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, TL_WA901ND_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(tl_wa901nd_gpio_buttons), ARRAY_SIZE(tl_wa901nd_gpio_buttons),
tl_wa901nd_gpio_buttons); tl_wa901nd_gpio_buttons);
ap91_pci_init(ee, mac); ap91_pci_init(ee, mac);
} }
MIPS_MACHINE(AR71XX_MACH_TL_WA901ND, "TL-WA901ND", "TP-LINK TL-WA901ND", MIPS_MACHINE(AR71XX_MACH_TL_WA901ND, "TL-WA901ND", "TP-LINK TL-WA901ND",
tl_wa901nd_setup); tl_wa901nd_setup);

View File

@ -42,20 +42,20 @@ static struct mtd_partition tl_wr1043nd_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x020000, .offset = 0x020000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x160000, .offset = 0x160000,
.size = 0x690000, .size = 0x690000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x7f0000, .offset = 0x7f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x020000, .offset = 0x020000,
.size = 0x7d0000, .size = 0x7d0000,

View File

@ -35,20 +35,20 @@ static struct mtd_partition tl_wr741nd_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x020000, .offset = 0x020000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x160000, .offset = 0x160000,
.size = 0x290000, .size = 0x290000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x020000, .offset = 0x020000,
.size = 0x3d0000, .size = 0x3d0000,
@ -58,8 +58,8 @@ static struct mtd_partition tl_wr741nd_partitions[] = {
static struct flash_platform_data tl_wr741nd_flash_data = { static struct flash_platform_data tl_wr741nd_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = tl_wr741nd_partitions, .parts = tl_wr741nd_partitions,
.nr_parts = ARRAY_SIZE(tl_wr741nd_partitions), .nr_parts = ARRAY_SIZE(tl_wr741nd_partitions),
#endif #endif
}; };

View File

@ -37,20 +37,20 @@ static struct mtd_partition tl_wr841n_v1_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x020000, .offset = 0x020000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x160000, .offset = 0x160000,
.size = 0x280000, .size = 0x280000,
} , { }, {
.name = "config", .name = "config",
.offset = 0x3e0000, .offset = 0x3e0000,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x020000, .offset = 0x020000,
.size = 0x3c0000, .size = 0x3c0000,
@ -60,8 +60,8 @@ static struct mtd_partition tl_wr841n_v1_partitions[] = {
static struct flash_platform_data tl_wr841n_v1_flash_data = { static struct flash_platform_data tl_wr841n_v1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = tl_wr841n_v1_partitions, .parts = tl_wr841n_v1_partitions,
.nr_parts = ARRAY_SIZE(tl_wr841n_v1_partitions), .nr_parts = ARRAY_SIZE(tl_wr841n_v1_partitions),
#endif #endif
}; };

View File

@ -37,20 +37,20 @@ static struct mtd_partition tl_wr941nd_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x020000, .offset = 0x020000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x160000, .offset = 0x160000,
.size = 0x290000, .size = 0x290000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x020000, .offset = 0x020000,
.size = 0x3d0000, .size = 0x3d0000,
@ -60,8 +60,8 @@ static struct mtd_partition tl_wr941nd_partitions[] = {
static struct flash_platform_data tl_wr941nd_flash_data = { static struct flash_platform_data tl_wr941nd_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = tl_wr941nd_partitions, .parts = tl_wr941nd_partitions,
.nr_parts = ARRAY_SIZE(tl_wr941nd_partitions), .nr_parts = ARRAY_SIZE(tl_wr941nd_partitions),
#endif #endif
}; };

View File

@ -55,41 +55,41 @@ static struct mtd_partition wndr3700_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x050000, .size = 0x050000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "env", .name = "env",
.offset = 0x050000, .offset = 0x050000,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x070000, .offset = 0x070000,
.size = 0x720000, .size = 0x720000,
} , { }, {
.name = "config", .name = "config",
.offset = 0x790000, .offset = 0x790000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "config_bak", .name = "config_bak",
.offset = 0x7a0000, .offset = 0x7a0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "pot", .name = "pot",
.offset = 0x7b0000, .offset = 0x7b0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "traffic_meter", .name = "traffic_meter",
.offset = 0x7c0000, .offset = 0x7c0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "language", .name = "language",
.offset = 0x7d0000, .offset = 0x7d0000,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "caldata", .name = "caldata",
.offset = 0x7f0000, .offset = 0x7f0000,
.size = 0x010000, .size = 0x010000,
@ -100,8 +100,8 @@ static struct mtd_partition wndr3700_partitions[] = {
static struct flash_platform_data wndr3700_flash_data = { static struct flash_platform_data wndr3700_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = wndr3700_partitions, .parts = wndr3700_partitions,
.nr_parts = ARRAY_SIZE(wndr3700_partitions), .nr_parts = ARRAY_SIZE(wndr3700_partitions),
#endif #endif
}; };
@ -144,7 +144,7 @@ static struct gpio_button wndr3700_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = WNDR3700_GPIO_BTN_WPS, .gpio = WNDR3700_GPIO_BTN_WPS,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "wifi", .desc = "wifi",
.type = EV_KEY, .type = EV_KEY,
.code = BTN_2, .code = BTN_2,
@ -155,8 +155,8 @@ static struct gpio_button wndr3700_gpio_buttons[] __initdata = {
}; };
static struct rtl8366s_platform_data wndr3700_rtl8366s_data = { static struct rtl8366s_platform_data wndr3700_rtl8366s_data = {
.gpio_sda = WNDR3700_GPIO_RTL8366_SDA, .gpio_sda = WNDR3700_GPIO_RTL8366_SDA,
.gpio_sck = WNDR3700_GPIO_RTL8366_SCK, .gpio_sck = WNDR3700_GPIO_RTL8366_SCK,
}; };
static struct platform_device wndr3700_rtl8366s_device = { static struct platform_device wndr3700_rtl8366s_device = {
@ -193,12 +193,12 @@ static void __init wndr3700_setup(void)
ar71xx_add_device_m25p80(&wndr3700_flash_data); ar71xx_add_device_m25p80(&wndr3700_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wndr3700_leds_gpio), ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wndr3700_leds_gpio),
wndr3700_leds_gpio); wndr3700_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, WNDR3700_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, WNDR3700_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(wndr3700_gpio_buttons), ARRAY_SIZE(wndr3700_gpio_buttons),
wndr3700_gpio_buttons); wndr3700_gpio_buttons);
platform_device_register(&wndr3700_rtl8366s_device); platform_device_register(&wndr3700_rtl8366s_device);
platform_device_register_simple("wndr3700-led-usb", -1, NULL, 0); platform_device_register_simple("wndr3700-led-usb", -1, NULL, 0);

View File

@ -38,31 +38,31 @@ static struct mtd_partition wnr2000_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "u-boot-env", .name = "u-boot-env",
.offset = 0x040000, .offset = 0x040000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x050000, .offset = 0x050000,
.size = 0x240000, .size = 0x240000,
} , { }, {
.name = "user-config", .name = "user-config",
.offset = 0x290000, .offset = 0x290000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "uImage", .name = "uImage",
.offset = 0x2a0000, .offset = 0x2a0000,
.size = 0x120000, .size = 0x120000,
} , { }, {
.name = "language_table", .name = "language_table",
.offset = 0x3c0000, .offset = 0x3c0000,
.size = 0x020000, .size = 0x020000,
} , { }, {
.name = "rootfs_checksum", .name = "rootfs_checksum",
.offset = 0x3e0000, .offset = 0x3e0000,
.size = 0x010000, .size = 0x010000,
} , { }, {
.name = "art", .name = "art",
.offset = 0x3f0000, .offset = 0x3f0000,
.size = 0x010000, .size = 0x010000,
@ -73,8 +73,8 @@ static struct mtd_partition wnr2000_partitions[] = {
static struct flash_platform_data wnr2000_flash_data = { static struct flash_platform_data wnr2000_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = wnr2000_partitions, .parts = wnr2000_partitions,
.nr_parts = ARRAY_SIZE(wnr2000_partitions), .nr_parts = ARRAY_SIZE(wnr2000_partitions),
#endif #endif
}; };

View File

@ -42,25 +42,25 @@ static struct mtd_partition wrt160nl_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x040000, .offset = 0x040000,
.size = 0x0e0000, .size = 0x0e0000,
} , { }, {
.name = "filesytem", .name = "filesytem",
.offset = 0x120000, .offset = 0x120000,
.size = 0x6c0000, .size = 0x6c0000,
} , { }, {
.name = "nvram", .name = "nvram",
.offset = 0x7e0000, .offset = 0x7e0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "ART", .name = "ART",
.offset = 0x7f0000, .offset = 0x7f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x040000, .offset = 0x040000,
.size = 0x7a0000, .size = 0x7a0000,
@ -70,8 +70,8 @@ static struct mtd_partition wrt160nl_partitions[] = {
static struct flash_platform_data wrt160nl_flash_data = { static struct flash_platform_data wrt160nl_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = wrt160nl_partitions, .parts = wrt160nl_partitions,
.nr_parts = ARRAY_SIZE(wrt160nl_partitions), .nr_parts = ARRAY_SIZE(wrt160nl_partitions),
#endif #endif
}; };
@ -121,7 +121,7 @@ static void __init wrt160nl_setup(void)
u8 mac[6]; u8 mac[6];
if (nvram_parse_mac_addr(nvram, WRT160NL_NVRAM_SIZE, if (nvram_parse_mac_addr(nvram, WRT160NL_NVRAM_SIZE,
"lan_hwaddr=", mac) == 0) { "lan_hwaddr=", mac) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
} }
@ -142,7 +142,7 @@ static void __init wrt160nl_setup(void)
ar71xx_add_device_usb(); ar71xx_add_device_usb();
if (nvram_parse_mac_addr(nvram, WRT160NL_NVRAM_SIZE, if (nvram_parse_mac_addr(nvram, WRT160NL_NVRAM_SIZE,
"wl0_hwaddr=", mac) == 0) "wl0_hwaddr=", mac) == 0)
ar913x_add_device_wmac(eeprom, mac); ar913x_add_device_wmac(eeprom, mac);
else else
ar913x_add_device_wmac(eeprom, NULL); ar913x_add_device_wmac(eeprom, NULL);

View File

@ -42,40 +42,40 @@ static struct mtd_partition wrt400n_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x030000, .size = 0x030000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "env", .name = "env",
.offset = 0x030000, .offset = 0x030000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "linux", .name = "linux",
.offset = 0x040000, .offset = 0x040000,
.size = 0x140000, .size = 0x140000,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x180000, .offset = 0x180000,
.size = 0x630000, .size = 0x630000,
} , { }, {
.name = "nvram", .name = "nvram",
.offset = 0x7b0000, .offset = 0x7b0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "factory", .name = "factory",
.offset = 0x7c0000, .offset = 0x7c0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "language", .name = "language",
.offset = 0x7d0000, .offset = 0x7d0000,
.size = 0x020000, .size = 0x020000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "caldata", .name = "caldata",
.offset = 0x7f0000, .offset = 0x7f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x040000, .offset = 0x040000,
.size = 0x770000, .size = 0x770000,
@ -85,8 +85,8 @@ static struct mtd_partition wrt400n_partitions[] = {
static struct flash_platform_data wrt400n_flash_data = { static struct flash_platform_data wrt400n_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = wrt400n_partitions, .parts = wrt400n_partitions,
.nr_parts = ARRAY_SIZE(wrt400n_partitions), .nr_parts = ARRAY_SIZE(wrt400n_partitions),
#endif #endif
}; };
@ -118,7 +118,7 @@ static struct gpio_button wrt400n_gpio_buttons[] __initdata = {
.threshold = 3, .threshold = 3,
.gpio = WRT400N_GPIO_BTN_RESET, .gpio = WRT400N_GPIO_BTN_RESET,
.active_low = 1, .active_low = 1,
} , { }, {
.desc = "wlsec", .desc = "wlsec",
.type = EV_KEY, .type = EV_KEY,
.code = KEY_WPS_BUTTON, .code = KEY_WPS_BUTTON,

View File

@ -93,8 +93,8 @@ static struct mtd_partition wzrhpg300nh_flash_partitions[] = {
static struct ar91xx_flash_platform_data wzrhpg300nh_flash_data = { static struct ar91xx_flash_platform_data wzrhpg300nh_flash_data = {
.width = 2, .width = 2,
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = wzrhpg300nh_flash_partitions, .parts = wzrhpg300nh_flash_partitions,
.nr_parts = ARRAY_SIZE(wzrhpg300nh_flash_partitions), .nr_parts = ARRAY_SIZE(wzrhpg300nh_flash_partitions),
#endif #endif
}; };
@ -213,8 +213,8 @@ static struct platform_device wzrhpg300nh_74hc153_device = {
}; };
static struct rtl8366s_platform_data wzrhpg300nh_rtl8366s_data = { static struct rtl8366s_platform_data wzrhpg300nh_rtl8366s_data = {
.gpio_sda = WZRHPG300NH_GPIO_RTL8366_SDA, .gpio_sda = WZRHPG300NH_GPIO_RTL8366_SDA,
.gpio_sck = WZRHPG300NH_GPIO_RTL8366_SCK, .gpio_sck = WZRHPG300NH_GPIO_RTL8366_SCK,
}; };
static struct platform_device wzrhpg300nh_rtl8366s_device = { static struct platform_device wzrhpg300nh_rtl8366s_device = {
@ -254,11 +254,11 @@ static void __init wzrhpg300nh_setup(void)
platform_device_register(&wzrhpg300nh_rtl8366s_device); platform_device_register(&wzrhpg300nh_rtl8366s_device);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wzrhpg300nh_leds_gpio), ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wzrhpg300nh_leds_gpio),
wzrhpg300nh_leds_gpio); wzrhpg300nh_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, WZRHPG300NH_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, WZRHPG300NH_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(wzrhpg300nh_gpio_buttons), ARRAY_SIZE(wzrhpg300nh_gpio_buttons),
wzrhpg300nh_gpio_buttons); wzrhpg300nh_gpio_buttons);
} }

View File

@ -43,35 +43,35 @@ static struct mtd_partition zcn_1523h_partitions[] = {
.offset = 0, .offset = 0,
.size = 0x040000, .size = 0x040000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "u-boot-env", .name = "u-boot-env",
.offset = 0x040000, .offset = 0x040000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "rootfs", .name = "rootfs",
.offset = 0x050000, .offset = 0x050000,
.size = 0x610000, .size = 0x610000,
} , { }, {
.name = "kernel", .name = "kernel",
.offset = 0x660000, .offset = 0x660000,
.size = 0x170000, .size = 0x170000,
} , { }, {
.name = "configure", .name = "configure",
.offset = 0x7d0000, .offset = 0x7d0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "mfg", .name = "mfg",
.offset = 0x7e0000, .offset = 0x7e0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "eeprom", .name = "eeprom",
.offset = 0x7f0000, .offset = 0x7f0000,
.size = 0x010000, .size = 0x010000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} , { }, {
.name = "firmware", .name = "firmware",
.offset = 0x050000, .offset = 0x050000,
.size = 0x780000, .size = 0x780000,
@ -81,8 +81,8 @@ static struct mtd_partition zcn_1523h_partitions[] = {
static struct flash_platform_data zcn_1523h_flash_data = { static struct flash_platform_data zcn_1523h_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
.parts = zcn_1523h_partitions, .parts = zcn_1523h_partitions,
.nr_parts = ARRAY_SIZE(zcn_1523h_partitions), .nr_parts = ARRAY_SIZE(zcn_1523h_partitions),
#endif #endif
}; };
@ -162,7 +162,7 @@ static void __init zcn_1523h_generic_setup(void)
ar71xx_add_device_m25p80(&zcn_1523h_flash_data); ar71xx_add_device_m25p80(&zcn_1523h_flash_data);
ar71xx_add_device_leds_gpio(0, ARRAY_SIZE(zcn_1523h_leds_gpio), ar71xx_add_device_leds_gpio(0, ARRAY_SIZE(zcn_1523h_leds_gpio),
zcn_1523h_leds_gpio); zcn_1523h_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, ZCN_1523H_BUTTONS_POLL_INTERVAL, ar71xx_add_device_gpio_buttons(-1, ZCN_1523H_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(zcn_1523h_gpio_buttons), ARRAY_SIZE(zcn_1523h_gpio_buttons),
@ -192,7 +192,7 @@ static void __init zcn_1523h_2_setup(void)
zcn_1523h_generic_setup(); zcn_1523h_generic_setup();
ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_2_leds_gpio), ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_2_leds_gpio),
zcn_1523h_2_leds_gpio); zcn_1523h_2_leds_gpio);
} }
MIPS_MACHINE(AR71XX_MACH_ZCN_1523H_2, "ZCN-1523H-2", "Zcomax ZCN-1523H-2", MIPS_MACHINE(AR71XX_MACH_ZCN_1523H_2, "ZCN-1523H-2", "Zcomax ZCN-1523H-2",
@ -203,7 +203,7 @@ static void __init zcn_1523h_5_setup(void)
zcn_1523h_generic_setup(); zcn_1523h_generic_setup();
ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_5_leds_gpio), ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_5_leds_gpio),
zcn_1523h_5_leds_gpio); zcn_1523h_5_leds_gpio);
ar71xx_add_device_eth(1); ar71xx_add_device_eth(1);
} }

View File

@ -69,7 +69,7 @@ int nvram_parse_mac_addr(const char *nvram, unsigned nvram_len,
ret = 0; ret = 0;
free: free:
vfree(buf); vfree(buf);
return ret; return ret;
} }

View File

@ -63,7 +63,7 @@ static void __init ar71xx_detect_mem_size(void)
unsigned long size; unsigned long size;
for (size = AR71XX_MEM_SIZE_MIN; size < AR71XX_MEM_SIZE_MAX; for (size = AR71XX_MEM_SIZE_MIN; size < AR71XX_MEM_SIZE_MAX;
size <<= 1 ) { size <<= 1) {
if (!memcmp(ar71xx_detect_mem_size, if (!memcmp(ar71xx_detect_mem_size,
ar71xx_detect_mem_size + size, 1024)) ar71xx_detect_mem_size + size, 1024))
break; break;

View File

@ -3,7 +3,7 @@
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
* *
* This file was derived from: inlude/asm-mips/mach-generic/mangle-port.h * This file was derived from: inlude/asm-mips/mach-generic/mangle-port.h
* Copyright (C) 2003, 2004 Ralf Baechle * Copyright (C) 2003, 2004 Ralf Baechle
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published * under the terms of the GNU General Public License version 2 as published

View File

@ -33,8 +33,8 @@ struct ag71xx_platform_data {
u8 has_ar8216:1; u8 has_ar8216:1;
u8 has_ar7240_switch:1; u8 has_ar7240_switch:1;
void (* ddr_flush)(void); void (*ddr_flush)(void);
void (* set_pll)(int speed); void (*set_pll)(int speed);
u32 fifo_cfg1; u32 fifo_cfg1;
u32 fifo_cfg2; u32 fifo_cfg2;

View File

@ -384,12 +384,12 @@ int __init ar724x_pcibios_init(void)
return 0; return 0;
err_unmap_ctrl: err_unmap_ctrl:
iounmap(ar724x_pci_ctrl_base); iounmap(ar724x_pci_ctrl_base);
err_unmap_devcfg: err_unmap_devcfg:
iounmap(ar724x_pci_devcfg_base); iounmap(ar724x_pci_devcfg_base);
err_unmap_localcfg: err_unmap_localcfg:
iounmap(ar724x_pci_localcfg_base); iounmap(ar724x_pci_localcfg_base);
err: err:
return ret; return ret;
} }

View File

@ -179,15 +179,15 @@ static int __devinit nxp_74hc153_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, nxp); platform_set_drvdata(pdev, nxp);
return 0; return 0;
err_free_2y: err_free_2y:
gpio_free(pdata->gpio_pin_2y); gpio_free(pdata->gpio_pin_2y);
err_free_1y: err_free_1y:
gpio_free(pdata->gpio_pin_1y); gpio_free(pdata->gpio_pin_1y);
err_free_s1: err_free_s1:
gpio_free(pdata->gpio_pin_s1); gpio_free(pdata->gpio_pin_s1);
err_free_s0: err_free_s0:
gpio_free(pdata->gpio_pin_s0); gpio_free(pdata->gpio_pin_s0);
err_free_nxp: err_free_nxp:
kfree(nxp); kfree(nxp);
return err; return err;
} }

View File

@ -90,7 +90,7 @@ static int __devinit rb750_led_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, drvdata); platform_set_drvdata(pdev, drvdata);
return 0; return 0;
err: err:
for (i = i - 1; i >= 0; i--) for (i = i - 1; i >= 0; i--)
led_classdev_unregister(&drvdata->led_devs[i].cdev); led_classdev_unregister(&drvdata->led_devs[i].cdev);

View File

@ -227,7 +227,7 @@ static int ar91xx_flash_probe(struct platform_device *pdev)
add_mtd_device(info->mtd); add_mtd_device(info->mtd);
return 0; return 0;
err_out: err_out:
ar91xx_flash_remove(pdev); ar91xx_flash_remove(pdev);
return err; return err;
} }
@ -246,7 +246,7 @@ static int ar91xx_flash_suspend(struct platform_device *dev, pm_message_t state)
return 0; return 0;
fail: fail:
if (info->mtd->suspend) { if (info->mtd->suspend) {
BUG_ON(!info->mtd->resume); BUG_ON(!info->mtd->resume);
info->mtd->resume(info->mtd); info->mtd->resume(info->mtd);

View File

@ -244,21 +244,21 @@ static int __init rb4xx_nand_probe(struct platform_device *pdev)
return 0; return 0;
err_release_nand: err_release_nand:
nand_release(&info->mtd); nand_release(&info->mtd);
err_set_drvdata: err_set_drvdata:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
err_free_info: err_free_info:
kfree(info); kfree(info);
err_free_gpio_nce: err_free_gpio_nce:
gpio_free(RB4XX_NAND_GPIO_NCE); gpio_free(RB4XX_NAND_GPIO_NCE);
err_free_gpio_cle: err_free_gpio_cle:
gpio_free(RB4XX_NAND_GPIO_CLE); gpio_free(RB4XX_NAND_GPIO_CLE);
err_free_gpio_ale: err_free_gpio_ale:
gpio_free(RB4XX_NAND_GPIO_ALE); gpio_free(RB4XX_NAND_GPIO_ALE);
err_free_gpio_ready: err_free_gpio_ready:
gpio_free(RB4XX_NAND_GPIO_READY); gpio_free(RB4XX_NAND_GPIO_READY);
err: err:
return ret; return ret;
} }

View File

@ -313,11 +313,11 @@ static int __init rb750_nand_probe(struct platform_device *pdev)
return 0; return 0;
err_release_nand: err_release_nand:
nand_release(&info->mtd); nand_release(&info->mtd);
err_set_drvdata: err_set_drvdata:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
err_free_info: err_free_info:
kfree(info); kfree(info);
return ret; return ret;
} }

View File

@ -158,9 +158,9 @@ static int wrt160nl_parse_partitions(struct mtd_info *master,
*pparts = trx_parts; *pparts = trx_parts;
ret = TRX_PARTS; ret = TRX_PARTS;
free_hdr: free_hdr:
vfree(header); vfree(header);
out: out:
return ret; return ret;
} }

View File

@ -89,7 +89,7 @@ struct ag71xx_desc {
struct ag71xx_buf { struct ag71xx_buf {
struct sk_buff *skb; struct sk_buff *skb;
struct ag71xx_desc *desc; struct ag71xx_desc *desc;
dma_addr_t dma_addr; dma_addr_t dma_addr;
u32 pad; u32 pad;
}; };
@ -162,7 +162,7 @@ struct ag71xx {
unsigned int link; unsigned int link;
unsigned int speed; unsigned int speed;
int duplex; int duplex;
struct work_struct restart_work; struct work_struct restart_work;
struct timer_list oom_timer; struct timer_list oom_timer;

View File

@ -414,7 +414,7 @@ static int ar7240sw_reset(struct ar7240sw *as)
AR7240_MASK_CTRL_SOFT_RESET); AR7240_MASK_CTRL_SOFT_RESET);
ret = ar7240sw_reg_wait(as, AR7240_REG_MASK_CTRL, ret = ar7240sw_reg_wait(as, AR7240_REG_MASK_CTRL,
AR7240_MASK_CTRL_SOFT_RESET, 0, 1000); AR7240_MASK_CTRL_SOFT_RESET, 0, 1000);
return ret; return ret;
} }
@ -518,7 +518,7 @@ static int ar7240_set_addr(struct ar7240sw *as, u8 *addr)
static int static int
ar7240_set_vid(struct switch_dev *dev, const struct switch_attr *attr, ar7240_set_vid(struct switch_dev *dev, const struct switch_attr *attr,
struct switch_val *val) struct switch_val *val)
{ {
struct ar7240sw *as = sw_to_ar7240(dev); struct ar7240sw *as = sw_to_ar7240(dev);
as->vlan_id[val->port_vlan] = val->value.i; as->vlan_id[val->port_vlan] = val->value.i;
@ -527,7 +527,7 @@ ar7240_set_vid(struct switch_dev *dev, const struct switch_attr *attr,
static int static int
ar7240_get_vid(struct switch_dev *dev, const struct switch_attr *attr, ar7240_get_vid(struct switch_dev *dev, const struct switch_attr *attr,
struct switch_val *val) struct switch_val *val)
{ {
struct ar7240sw *as = sw_to_ar7240(dev); struct ar7240sw *as = sw_to_ar7240(dev);
val->value.i = as->vlan_id[val->port_vlan]; val->value.i = as->vlan_id[val->port_vlan];
@ -613,7 +613,7 @@ ar7240_set_ports(struct switch_dev *dev, struct switch_val *val)
static int static int
ar7240_set_vlan(struct switch_dev *dev, const struct switch_attr *attr, ar7240_set_vlan(struct switch_dev *dev, const struct switch_attr *attr,
struct switch_val *val) struct switch_val *val)
{ {
struct ar7240sw *as = sw_to_ar7240(dev); struct ar7240sw *as = sw_to_ar7240(dev);
as->vlan = !!val->value.i; as->vlan = !!val->value.i;
@ -622,7 +622,7 @@ ar7240_set_vlan(struct switch_dev *dev, const struct switch_attr *attr,
static int static int
ar7240_get_vlan(struct switch_dev *dev, const struct switch_attr *attr, ar7240_get_vlan(struct switch_dev *dev, const struct switch_attr *attr,
struct switch_val *val) struct switch_val *val)
{ {
struct ar7240sw *as = sw_to_ar7240(dev); struct ar7240sw *as = sw_to_ar7240(dev);
val->value.i = as->vlan; val->value.i = as->vlan;
@ -790,8 +790,8 @@ static struct ar7240sw *ar7240_probe(struct ag71xx *ag)
swdev->ops = &ar7240_ops; swdev->ops = &ar7240_ops;
if (register_switch(&as->swdev, ag->dev) < 0) { if (register_switch(&as->swdev, ag->dev) < 0) {
kfree(as); kfree(as);
return NULL; return NULL;
} }
printk("%s: Found an AR7240 built-in switch\n", ag->dev->name); printk("%s: Found an AR7240 built-in switch\n", ag->dev->name);

View File

@ -44,8 +44,8 @@ void ag71xx_debugfs_update_int_stats(struct ag71xx *ag, u32 status)
static ssize_t read_file_int_stats(struct file *file, char __user *user_buf, static ssize_t read_file_int_stats(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
#define PR_INT_STAT(_label, _field) \ #define PR_INT_STAT(_label, _field) \
len += snprintf(buf + len, sizeof(buf) - len, \ len += snprintf(buf + len, sizeof(buf) - len, \
"%20s: %10lu\n", _label, ag->debug.int_stats._field); "%20s: %10lu\n", _label, ag->debug.int_stats._field);
struct ag71xx *ag = file->private_data; struct ag71xx *ag = file->private_data;
@ -173,7 +173,7 @@ int ag71xx_debugfs_init(struct ag71xx *ag)
return 0; return 0;
err: err:
ag71xx_debugfs_exit(ag); ag71xx_debugfs_exit(ag);
return -ENOMEM; return -ENOMEM;
} }

View File

@ -14,14 +14,14 @@
#include "ag71xx.h" #include "ag71xx.h"
#define AG71XX_DEFAULT_MSG_ENABLE \ #define AG71XX_DEFAULT_MSG_ENABLE \
( NETIF_MSG_DRV \ (NETIF_MSG_DRV \
| NETIF_MSG_PROBE \ | NETIF_MSG_PROBE \
| NETIF_MSG_LINK \ | NETIF_MSG_LINK \
| NETIF_MSG_TIMER \ | NETIF_MSG_TIMER \
| NETIF_MSG_IFDOWN \ | NETIF_MSG_IFDOWN \
| NETIF_MSG_IFUP \ | NETIF_MSG_IFUP \
| NETIF_MSG_RX_ERR \ | NETIF_MSG_RX_ERR \
| NETIF_MSG_TX_ERR ) | NETIF_MSG_TX_ERR)
static int ag71xx_msg_level = -1; static int ag71xx_msg_level = -1;
@ -126,7 +126,7 @@ static int ag71xx_ring_alloc(struct ag71xx_ring *ring, unsigned int size)
return 0; return 0;
err: err:
return err; return err;
} }
@ -599,7 +599,7 @@ static int ag71xx_open(struct net_device *dev)
return 0; return 0;
err: err:
ag71xx_rings_cleanup(ag); ag71xx_rings_cleanup(ag);
return ret; return ret;
} }
@ -676,7 +676,7 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct sk_buff *skb,
return NETDEV_TX_OK; return NETDEV_TX_OK;
err_drop: err_drop:
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
dev_kfree_skb(skb); dev_kfree_skb(skb);
@ -908,12 +908,12 @@ static int ag71xx_poll(struct napi_struct *napi, int limit)
return rx_done; return rx_done;
} }
more: more:
DBG("%s: stay in polling mode, rx=%d, tx=%d, limit=%d\n", DBG("%s: stay in polling mode, rx=%d, tx=%d, limit=%d\n",
dev->name, rx_done, tx_done, limit); dev->name, rx_done, tx_done, limit);
return rx_done; return rx_done;
oom: oom:
if (netif_msg_rx_err(ag)) if (netif_msg_rx_err(ag))
printk(KERN_DEBUG "%s: out of memory\n", dev->name); printk(KERN_DEBUG "%s: out of memory\n", dev->name);
@ -1105,19 +1105,19 @@ static int __devinit ag71xx_probe(struct platform_device *pdev)
return 0; return 0;
err_phy_disconnect: err_phy_disconnect:
ag71xx_phy_disconnect(ag); ag71xx_phy_disconnect(ag);
err_unregister_netdev: err_unregister_netdev:
unregister_netdev(dev); unregister_netdev(dev);
err_free_irq: err_free_irq:
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
err_unmap_mii_ctrl: err_unmap_mii_ctrl:
iounmap(ag->mii_ctrl); iounmap(ag->mii_ctrl);
err_unmap_base: err_unmap_base:
iounmap(ag->mac_base); iounmap(ag->mac_base);
err_free_dev: err_free_dev:
kfree(dev); kfree(dev);
err_out: err_out:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
return err; return err;
} }
@ -1168,11 +1168,11 @@ static int __init ag71xx_module_init(void)
return 0; return 0;
err_mdio_exit: err_mdio_exit:
ag71xx_mdio_driver_exit(); ag71xx_mdio_driver_exit();
err_debugfs_exit: err_debugfs_exit:
ag71xx_debugfs_root_exit(); ag71xx_debugfs_root_exit();
err_out: err_out:
return ret; return ret;
} }

View File

@ -73,7 +73,7 @@ static int ag71xx_mdio_mii_read(struct ag71xx_mdio *am, int addr, int reg)
DBG("mii_read: addr=%04x, reg=%04x, value=%04x\n", addr, reg, ret); DBG("mii_read: addr=%04x, reg=%04x, value=%04x\n", addr, reg, ret);
out: out:
return ret; return ret;
} }
@ -199,13 +199,13 @@ static int __devinit ag71xx_mdio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, am); platform_set_drvdata(pdev, am);
return 0; return 0;
err_free_bus: err_free_bus:
mdiobus_free(am->mii_bus); mdiobus_free(am->mii_bus);
err_iounmap: err_iounmap:
iounmap(am->mdio_base); iounmap(am->mdio_base);
err_free_mdio: err_free_mdio:
kfree(am); kfree(am);
err_out: err_out:
return err; return err;
} }

View File

@ -37,8 +37,8 @@
#define AP83_SPI_GPIO_MISO 3 #define AP83_SPI_GPIO_MISO 3
struct ap83_spi { struct ap83_spi {
struct spi_bitbang bitbang; struct spi_bitbang bitbang;
void __iomem *base; void __iomem *base;
u32 addr; u32 addr;
struct platform_device *pdev; struct platform_device *pdev;
@ -230,15 +230,15 @@ static int ap83_spi_probe(struct platform_device *pdev)
return 0; return 0;
err_unmap: err_unmap:
iounmap(sp->base); iounmap(sp->base);
err_spi_put: err_spi_put:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master); spi_master_put(sp->bitbang.master);
err_free_cs: err_free_cs:
gpio_free(AP83_SPI_GPIO_CS); gpio_free(AP83_SPI_GPIO_CS);
err_free_miso: err_free_miso:
gpio_free(AP83_SPI_GPIO_MISO); gpio_free(AP83_SPI_GPIO_MISO);
return ret; return ret;
} }

View File

@ -31,11 +31,11 @@
#undef PER_BIT_READ #undef PER_BIT_READ
struct ar71xx_spi { struct ar71xx_spi {
struct spi_bitbang bitbang; struct spi_bitbang bitbang;
u32 ioc_base; u32 ioc_base;
u32 reg_ctrl; u32 reg_ctrl;
void __iomem *base; void __iomem *base;
struct platform_device *pdev; struct platform_device *pdev;
u32 (*get_ioc_base)(u8 chip_select, int cs_high, u32 (*get_ioc_base)(u8 chip_select, int cs_high,
@ -234,7 +234,7 @@ static int ar71xx_spi_probe(struct platform_device *pdev)
return 0; return 0;
iounmap(sp->base); iounmap(sp->base);
err1: err1:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master); spi_master_put(sp->bitbang.master);

View File

@ -31,11 +31,11 @@
#undef PER_BIT_READ #undef PER_BIT_READ
struct ar71xx_spi { struct ar71xx_spi {
struct spi_bitbang bitbang; struct spi_bitbang bitbang;
u32 ioc_base; u32 ioc_base;
u32 reg_ctrl; u32 reg_ctrl;
void __iomem *base; void __iomem *base;
struct platform_device *pdev; struct platform_device *pdev;
}; };
@ -252,7 +252,7 @@ static int pb44_spi_probe(struct platform_device *pdev)
return 0; return 0;
iounmap(sp->base); iounmap(sp->base);
err1: err1:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master); spi_master_put(sp->bitbang.master);

View File

@ -247,7 +247,7 @@ static int rb4xx_spi_msg(struct rb4xx_spi *rbspi, struct spi_message *m)
__raw_writel(SPI_CTRL_FASTEST, base + SPI_REG_CTRL); __raw_writel(SPI_CTRL_FASTEST, base + SPI_REG_CTRL);
do_spi_init(m->spi); do_spi_init(m->spi);
list_for_each_entry (t, &m->transfers, transfer_list) { list_for_each_entry(t, &m->transfers, transfer_list) {
int len; int len;
len = rb4xx_spi_txrx(base, t); len = rb4xx_spi_txrx(base, t);
@ -338,13 +338,13 @@ static int rb4xx_spi_setup(struct spi_device *spi)
if (spi->mode & ~(SPI_CS_HIGH)) { if (spi->mode & ~(SPI_CS_HIGH)) {
dev_err(&spi->dev, "mode %x not supported\n", dev_err(&spi->dev, "mode %x not supported\n",
(unsigned) spi->mode); (unsigned) spi->mode);
return -EINVAL; return -EINVAL;
} }
if (spi->bits_per_word != 8 && spi->bits_per_word != 0) { if (spi->bits_per_word != 8 && spi->bits_per_word != 0) {
dev_err(&spi->dev, "bits_per_word %u not supported\n", dev_err(&spi->dev, "bits_per_word %u not supported\n",
(unsigned) spi->bits_per_word); (unsigned) spi->bits_per_word);
return -EINVAL; return -EINVAL;
} }
@ -432,12 +432,12 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
return 0; return 0;
err_iounmap: err_iounmap:
iounmap(rbspi->base); iounmap(rbspi->base);
err_put_master: err_put_master:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
spi_master_put(master); spi_master_put(master);
err_out: err_out:
return err; return err;
} }
@ -455,10 +455,10 @@ static int rb4xx_spi_remove(struct platform_device *pdev)
static struct platform_driver rb4xx_spi_drv = { static struct platform_driver rb4xx_spi_drv = {
.probe = rb4xx_spi_probe, .probe = rb4xx_spi_probe,
.remove = rb4xx_spi_remove, .remove = rb4xx_spi_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
}; };
static int __init rb4xx_spi_init(void) static int __init rb4xx_spi_init(void)

View File

@ -393,7 +393,7 @@ static int __devinit rb4xx_cpld_probe(struct spi_device *spi)
return 0; return 0;
err_drvdata: err_drvdata:
dev_set_drvdata(&spi->dev, NULL); dev_set_drvdata(&spi->dev, NULL);
kfree(cpld); kfree(cpld);

View File

@ -56,8 +56,8 @@
#define VSC73XX_MAC_CFG_WEXC_DIS (1 << 31) #define VSC73XX_MAC_CFG_WEXC_DIS (1 << 31)
#define VSC73XX_MAC_CFG_PORT_RST (1 << 29) #define VSC73XX_MAC_CFG_PORT_RST (1 << 29)
#define VSC73XX_MAC_CFG_TX_EN (1 << 28) #define VSC73XX_MAC_CFG_TX_EN (1 << 28)
#define VSC73XX_MAC_CFG_SEED_LOAD (1 << 27) #define VSC73XX_MAC_CFG_SEED_LOAD (1 << 27)
#define VSC73XX_MAC_CFG_FDX (1 << 18) #define VSC73XX_MAC_CFG_FDX (1 << 18)
#define VSC73XX_MAC_CFG_GIGE (1 << 17) #define VSC73XX_MAC_CFG_GIGE (1 << 17)
#define VSC73XX_MAC_CFG_RX_EN (1 << 16) #define VSC73XX_MAC_CFG_RX_EN (1 << 16)
#define VSC73XX_MAC_CFG_VLAN_DBLAWR (1 << 15) #define VSC73XX_MAC_CFG_VLAN_DBLAWR (1 << 15)
@ -430,7 +430,7 @@ static int vsc7385_upload_ucode(struct vsc7385 *vsc)
rc = vsc7385_icpu_start(vsc); rc = vsc7385_icpu_start(vsc);
out: out:
release_firmware(firmware); release_firmware(firmware);
return rc; return rc;
} }
@ -475,7 +475,7 @@ static int vsc7385_setup(struct vsc7385 *vsc)
return 0; return 0;
err: err:
return err; return err;
} }
@ -520,7 +520,7 @@ static int vsc7385_detect(struct vsc7385 *vsc)
rev = (t >> VSC73XX_ICPU_CHIPID_REV_SHIFT) & rev = (t >> VSC73XX_ICPU_CHIPID_REV_SHIFT) &
VSC73XX_ICPU_CHIPID_REV_MASK; VSC73XX_ICPU_CHIPID_REV_MASK;
dev_info(&spi->dev, "VSC%04X (rev. %d) switch found \n", id, rev); dev_info(&spi->dev, "VSC%04X (rev. %d) switch found\n", id, rev);
return 0; return 0;
} }
@ -536,13 +536,13 @@ static int __devinit vsc7385_probe(struct spi_device *spi)
pdata = spi->dev.platform_data; pdata = spi->dev.platform_data;
if (!pdata) { if (!pdata) {
dev_err(&spi->dev, "no platform data specified\n"); dev_err(&spi->dev, "no platform data specified\n");
return-ENODEV; return -ENODEV;
} }
vsc = kzalloc(sizeof(*vsc), GFP_KERNEL); vsc = kzalloc(sizeof(*vsc), GFP_KERNEL);
if (!vsc) { if (!vsc) {
dev_err(&spi->dev, "no memory for private data\n"); dev_err(&spi->dev, "no memory for private data\n");
return-ENOMEM; return -ENOMEM;
} }
mutex_init(&vsc->lock); mutex_init(&vsc->lock);
@ -554,13 +554,13 @@ static int __devinit vsc7385_probe(struct spi_device *spi)
spi->bits_per_word = 8; spi->bits_per_word = 8;
err = spi_setup(spi); err = spi_setup(spi);
if (err) { if (err) {
dev_err(&spi->dev, "spi_setup failed, err=%d \n", err); dev_err(&spi->dev, "spi_setup failed, err=%d\n", err);
goto err_drvdata; goto err_drvdata;
} }
err = vsc7385_detect(vsc); err = vsc7385_detect(vsc);
if (err) { if (err) {
dev_err(&spi->dev, "no chip found, err=%d \n", err); dev_err(&spi->dev, "no chip found, err=%d\n", err);
goto err_drvdata; goto err_drvdata;
} }
@ -574,7 +574,7 @@ static int __devinit vsc7385_probe(struct spi_device *spi)
return 0; return 0;
err_drvdata: err_drvdata:
dev_set_drvdata(&spi->dev, NULL); dev_set_drvdata(&spi->dev, NULL);
kfree(vsc); kfree(vsc);
return err; return err;

View File

@ -117,12 +117,12 @@ static int ehci_ar71xx_probe(const struct hc_driver *driver,
return 0; return 0;
err_iounmap: err_iounmap:
iounmap(hcd->regs); iounmap(hcd->regs);
err_release_region: err_release_region:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len); release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err_put_hcd: err_put_hcd:
usb_put_hcd(hcd); usb_put_hcd(hcd);
return ret; return ret;
} }

View File

@ -70,11 +70,11 @@ static int usb_hcd_ar71xx_probe(const struct hc_driver *driver,
return 0; return 0;
err_stop_hcd: err_stop_hcd:
iounmap(hcd->regs); iounmap(hcd->regs);
err_release_region: err_release_region:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len); release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err_put_hcd: err_put_hcd:
usb_put_hcd(hcd); usb_put_hcd(hcd);
return ret; return ret;
} }
@ -102,7 +102,7 @@ static int __devinit ohci_ar71xx_start(struct usb_hcd *hcd)
return 0; return 0;
err: err:
ohci_stop(hcd); ohci_stop(hcd);
return ret; return ret;
} }

View File

@ -115,7 +115,7 @@ static int ar71xx_wdt_release(struct inode *inode, struct file *file)
static ssize_t ar71xx_wdt_write(struct file *file, const char *data, static ssize_t ar71xx_wdt_write(struct file *file, const char *data,
size_t len, loff_t *ppos) size_t len, loff_t *ppos)
{ {
if (len) { if (len) {
if (!nowayout) { if (!nowayout) {
size_t i; size_t i;
@ -142,7 +142,7 @@ static ssize_t ar71xx_wdt_write(struct file *file, const char *data,
static struct watchdog_info ar71xx_wdt_info = { static struct watchdog_info ar71xx_wdt_info = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE | WDIOF_CARDRESET, WDIOF_MAGICCLOSE | WDIOF_CARDRESET,
.firmware_version = 0, .firmware_version = 0,
.identity = "AR71XX watchdog", .identity = "AR71XX watchdog",
}; };
@ -226,7 +226,7 @@ static int __devinit ar71xx_wdt_probe(struct platform_device *pdev)
printk(KERN_INFO DRV_DESC " version " DRV_VERSION "\n"); printk(KERN_INFO DRV_DESC " version " DRV_VERSION "\n");
printk(KERN_DEBUG DRV_NAME ": timeout=%d secs (max=%d)\n", printk(KERN_DEBUG DRV_NAME ": timeout=%d secs (max=%d)\n",
wdt_timeout, max_timeout); wdt_timeout, max_timeout);
return 0; return 0;

View File

@ -9,7 +9,7 @@
*/ */
struct vsc7385_platform_data { struct vsc7385_platform_data {
void (* reset)(void); void (*reset)(void);
char *ucode_name; char *ucode_name;
struct { struct {
u32 tx_ipg:5; u32 tx_ipg:5;