diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-08-25 07:28:04 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-08-25 07:28:04 +0000 |
commit | e8422131f107949217eb523121b84b38394ae2a1 (patch) | |
tree | 3256f4bb26f5b58dd764eea642b77921ba249aaa /target/linux/adm5120/files-2.6.26/arch | |
parent | 1673462564c42d99e7aebf4c9aaaf4d4d3742299 (diff) | |
download | master-31e0f0ae-e8422131f107949217eb523121b84b38394ae2a1.tar.gz master-31e0f0ae-e8422131f107949217eb523121b84b38394ae2a1.tar.bz2 master-31e0f0ae-e8422131f107949217eb523121b84b38394ae2a1.zip |
minor cleanups
SVN-Revision: 12387
Diffstat (limited to 'target/linux/adm5120/files-2.6.26/arch')
13 files changed, 17 insertions, 23 deletions
diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/cellvision/cellvision.h b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/cellvision/cellvision.h index 70742e9b59..175fbb249c 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/cellvision/cellvision.h +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/cellvision/cellvision.h @@ -12,6 +12,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/gpio.h> +#include <linux/irq.h> #include <linux/etherdevice.h> #include <asm/bootinfo.h> @@ -19,7 +20,6 @@ #include <asm/mach-adm5120/adm5120_info.h> #include <asm/mach-adm5120/adm5120_board.h> #include <asm/mach-adm5120/adm5120_platform.h> -#include <asm/mach-adm5120/adm5120_irq.h> extern void cellvision_mac_setup(void) __init; diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/board.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/board.c index bfd4bf8bef..ffca7e01c7 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/board.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/board.c @@ -12,6 +12,7 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/list.h> +#include <linux/string.h> #include <linux/device.h> #include <linux/platform_device.h> @@ -19,7 +20,6 @@ #include <asm/mach-adm5120/adm5120_info.h> #include <asm/mach-adm5120/adm5120_defs.h> -#include <asm/mach-adm5120/adm5120_irq.h> #include <asm/mach-adm5120/adm5120_board.h> #include <asm/mach-adm5120/adm5120_platform.h> @@ -60,9 +60,9 @@ static int __init adm5120_board_setup(void) mips_machtype); if (board->name[0]) - memcpy(adm5120_board_name, board->name, ADM5120_BOARD_NAMELEN); + strlcpy(adm5120_board_name, board->name, ADM5120_BOARD_NAMELEN); - printk(KERN_INFO PFX "board is '%s'\n", board->name); + printk(KERN_INFO PFX "board is '%s'\n", adm5120_board_name); adm5120_gpio_init(); diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/gpio.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/gpio.c index bce3dddf98..aed0038752 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/gpio.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/gpio.c @@ -13,17 +13,17 @@ #include <linux/init.h> #include <linux/types.h> #include <linux/module.h> +#include <linux/irq.h> #include <linux/delay.h> #include <linux/platform_device.h> #include <linux/io.h> +#include <linux/gpio.h> #include <asm/addrspace.h> -#include <linux/gpio.h> #include <asm/mach-adm5120/adm5120_defs.h> #include <asm/mach-adm5120/adm5120_info.h> #include <asm/mach-adm5120/adm5120_switch.h> -#include <asm/mach-adm5120/adm5120_irq.h> #define GPIO_READ(r) __raw_readl((r)) #define GPIO_WRITE(v, r) __raw_writel((v), (r)) diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/irq.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/irq.c index ce303ec74a..140a7a0e95 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/irq.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/irq.c @@ -12,17 +12,16 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/version.h> +#include <linux/irq.h> #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/io.h> -#include <asm/irq.h> #include <asm/irq_cpu.h> #include <asm/mipsregs.h> #include <asm/bitops.h> #include <asm/mach-adm5120/adm5120_defs.h> -#include <asm/mach-adm5120/adm5120_irq.h> static void adm5120_intc_irq_unmask(unsigned int irq); static void adm5120_intc_irq_mask(unsigned int irq); @@ -121,9 +120,7 @@ static void adm5120_intc_irq_dispatch(void) unsigned long status; int irq; - /* dispatch only one IRQ at a time */ status = intc_read_reg(INTC_REG_IRQ_STATUS) & INTC_INT_ALL; - if (status) { irq = ADM5120_INTC_IRQ_BASE + fls(status) - 1; do_IRQ(irq); diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/platform.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/platform.c index 5cae2023fd..9526fe977f 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/platform.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/platform.c @@ -16,12 +16,12 @@ #include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/gpio.h> +#include <linux/irq.h> #include <asm/bootinfo.h> #include <asm/mach-adm5120/adm5120_defs.h> #include <asm/mach-adm5120/adm5120_info.h> -#include <asm/mach-adm5120/adm5120_irq.h> #include <asm/mach-adm5120/adm5120_switch.h> #include <asm/mach-adm5120/adm5120_nand.h> #include <asm/mach-adm5120/adm5120_platform.h> diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/prom.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/prom.c index af2bfb5a53..260c4e5bbf 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/prom.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/prom.c @@ -241,9 +241,7 @@ static void __init prom_init_cmdline(void) /* init command line, register a default kernel command line */ cmd = &_image_cmdline + 8; if (strlen(cmd) > 0) - strcpy(arcs_cmdline, cmd); - else - strcpy(arcs_cmdline, CONFIG_CMDLINE); + strlcpy(arcs_cmdline, cmd, sizeof(arcs_cmdline)); } @@ -262,7 +260,6 @@ void __init prom_putchar(char ch) void __init prom_init(void) { prom_detect_machtype(); - prom_init_cmdline(); } diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/setup.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/setup.c index 3a31917a2b..0a11774624 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/setup.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/common/setup.c @@ -69,7 +69,7 @@ static void adm5120_halt(void) while (1) { if (cpu_wait) cpu_wait(); - }; + } } void __init plat_time_init(void) diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.c index 81157812bb..d100bf0343 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.c @@ -34,8 +34,8 @@ void __init compex_mac_setup(void) for (i = 0; i < 6; i++) { if (is_valid_ether_addr(myloader_info.macs[i])) - memcpy(myloader_info.macs[i], - adm5120_eth_macs[i], ETH_ALEN); + memcpy(adm5120_eth_macs[i], + myloader_info.macs[i], ETH_ALEN); else random_ether_addr(adm5120_eth_macs[i]); } diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.h b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.h index 739a90d023..62425374ad 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.h +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/compex/compex.h @@ -12,6 +12,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/gpio.h> +#include <linux/irq.h> #include <linux/etherdevice.h> #include <asm/bootinfo.h> @@ -19,6 +20,5 @@ #include <asm/mach-adm5120/adm5120_info.h> #include <asm/mach-adm5120/adm5120_board.h> #include <asm/mach-adm5120/adm5120_platform.h> -#include <asm/mach-adm5120/adm5120_irq.h> extern void compex_generic_setup(void) __init; diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/edimax/br-61xx.h b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/edimax/br-61xx.h index d7efda32d1..f8ad137a49 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/edimax/br-61xx.h +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/edimax/br-61xx.h @@ -12,12 +12,12 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/gpio.h> +#include <linux/irq.h> #include <linux/etherdevice.h> #include <asm/bootinfo.h> #include <asm/mach-adm5120/adm5120_board.h> -#include <asm/mach-adm5120/adm5120_irq.h> #include <asm/mach-adm5120/adm5120_platform.h> extern void __init br61xx_generic_setup(void) __init; diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/infineon/infineon.h b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/infineon/infineon.h index f3b28e0880..2e25a8f3de 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/infineon/infineon.h +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/infineon/infineon.h @@ -12,12 +12,12 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/gpio.h> +#include <linux/irq.h> #include <linux/etherdevice.h> #include <asm/bootinfo.h> #include <asm/mach-adm5120/adm5120_defs.h> -#include <asm/mach-adm5120/adm5120_irq.h> #include <asm/mach-adm5120/adm5120_board.h> #include <asm/mach-adm5120/adm5120_platform.h> #include <asm/mach-adm5120/adm5120_info.h> diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.h b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.h index d5acef028e..1577ed66d0 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.h +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.h @@ -13,12 +13,12 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/gpio.h> +#include <linux/irq.h> #include <linux/etherdevice.h> #include <asm/bootinfo.h> #include <asm/mach-adm5120/adm5120_defs.h> -#include <asm/mach-adm5120/adm5120_irq.h> #include <asm/mach-adm5120/adm5120_nand.h> #include <asm/mach-adm5120/adm5120_board.h> #include <asm/mach-adm5120/adm5120_platform.h> diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/zyxel/p-33x.h b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/zyxel/p-33x.h index 4817e81050..0971cd5d26 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/zyxel/p-33x.h +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/zyxel/p-33x.h @@ -12,11 +12,11 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/gpio.h> +#include <linux/irq.h> #include <asm/bootinfo.h> #include <asm/mach-adm5120/adm5120_board.h> #include <asm/mach-adm5120/adm5120_platform.h> -#include <asm/mach-adm5120/adm5120_irq.h> extern void p33x_generic_setup(void) __init; |