atheros: indent fixes

Various indent fixes suggested by checkpatch: use tabs, use same level
of indentation for switch and case, correct indentation levels.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41090
This commit is contained in:
Felix Fietkau 2014-06-10 09:06:03 +00:00
parent 66c64834f8
commit dd31da467f
5 changed files with 146 additions and 145 deletions

View file

@ -1292,7 +1292,7 @@
+#endif /* __AR2315_REG_H */ +#endif /* __AR2315_REG_H */
--- /dev/null --- /dev/null
+++ b/arch/mips/include/asm/mach-ar231x/ar5312_regs.h +++ b/arch/mips/include/asm/mach-ar231x/ar5312_regs.h
@@ -0,0 +1,232 @@ @@ -0,0 +1,233 @@
+/* +/*
+ * This file is subject to the terms and conditions of the GNU General Public + * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive + * License. See the file "COPYING" in the main directory of this archive
@ -1444,7 +1444,8 @@
+#define AR531X_ENABLE_UART_AND_WLAN1_PIO 0x0008 /* UART, and WLAN1 PIOs */ +#define AR531X_ENABLE_UART_AND_WLAN1_PIO 0x0008 /* UART, and WLAN1 PIOs */
+#define AR531X_ENABLE_WLAN1_DMA 0x0010 /* WLAN1 DMAs */ +#define AR531X_ENABLE_WLAN1_DMA 0x0010 /* WLAN1 DMAs */
+#define AR531X_ENABLE_WLAN1 \ +#define AR531X_ENABLE_WLAN1 \
+ (AR531X_ENABLE_UART_AND_WLAN1_PIO | AR531X_ENABLE_WLAN1_DMA) + (AR531X_ENABLE_UART_AND_WLAN1_PIO |\
+ AR531X_ENABLE_WLAN1_DMA)
+ +
+/* AR531X_REV register bit field definitions */ +/* AR531X_REV register bit field definitions */
+#define AR531X_REV_WMAC_MAJ 0xf000 +#define AR531X_REV_WMAC_MAJ 0xf000
@ -2080,8 +2081,8 @@
+ memcfg = ar231x_read_reg(AR531X_MEM_CFG1); + memcfg = ar231x_read_reg(AR531X_MEM_CFG1);
+ bank0AC = (memcfg & MEM_CFG1_AC0) >> MEM_CFG1_AC0_S; + bank0AC = (memcfg & MEM_CFG1_AC0) >> MEM_CFG1_AC0_S;
+ bank1AC = (memcfg & MEM_CFG1_AC1) >> MEM_CFG1_AC1_S; + bank1AC = (memcfg & MEM_CFG1_AC1) >> MEM_CFG1_AC1_S;
+ memsize = (bank0AC ? (1 << (bank0AC+1)) : 0) + memsize = (bank0AC ? (1 << (bank0AC+1)) : 0) +
+ + (bank1AC ? (1 << (bank1AC+1)) : 0); + (bank1AC ? (1 << (bank1AC+1)) : 0);
+ memsize <<= 20; + memsize <<= 20;
+ add_memory_region(0, memsize, BOOT_MEM_RAM); + add_memory_region(0, memsize, BOOT_MEM_RAM);
+ +
@ -2109,7 +2110,7 @@
+ +
--- /dev/null --- /dev/null
+++ b/arch/mips/ar231x/ar2315.c +++ b/arch/mips/ar231x/ar2315.c
@@ -0,0 +1,691 @@ @@ -0,0 +1,693 @@
+/* +/*
+ * This file is subject to the terms and conditions of the GNU General Public + * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive + * License. See the file "COPYING" in the main directory of this archive
@ -2560,7 +2561,7 @@
+ u32 flash_size = 0; + u32 flash_size = 0;
+ +
+ /* probe the flash chip size */ + /* probe the flash chip size */
+ switch(spiflash_probe()) { + switch (spiflash_probe()) {
+ case STM_8MBIT_SIGNATURE: + case STM_8MBIT_SIGNATURE:
+ flash_size = 0x00100000; + flash_size = 0x00100000;
+ break; + break;
@ -2697,10 +2698,12 @@
+ switch (clock_ctl & CPUCLK_CLK_SEL_M) { + switch (clock_ctl & CPUCLK_CLK_SEL_M) {
+ case 0: + case 0:
+ case 1: + case 1:
+ clk_div = pllc_divide_table[(pllc_ctrl & PLLC_CLKM_DIV_M) >> PLLC_CLKM_DIV_S]; + clk_div = pllc_divide_table[(pllc_ctrl & PLLC_CLKM_DIV_M) >>
+ PLLC_CLKM_DIV_S];
+ break; + break;
+ case 2: + case 2:
+ clk_div = pllc_divide_table[(pllc_ctrl & PLLC_CLKC_DIV_M) >> PLLC_CLKC_DIV_S]; + clk_div = pllc_divide_table[(pllc_ctrl & PLLC_CLKC_DIV_M) >>
+ PLLC_CLKC_DIV_S];
+ break; + break;
+ default: + default:
+ pllc_out = 40000000; + pllc_out = 40000000;
@ -2770,7 +2773,7 @@
+ +
+ /* Detect the hardware based on the device ID */ + /* Detect the hardware based on the device ID */
+ devid = ar231x_read_reg(AR2315_SREV) & AR2315_REV_CHIP; + devid = ar231x_read_reg(AR2315_SREV) & AR2315_REV_CHIP;
+ switch(devid) { + switch (devid) {
+ case 0x90: + case 0x90:
+ case 0x91: + case 0x91:
+ ar231x_devtype = DEV_TYPE_AR2317; + ar231x_devtype = DEV_TYPE_AR2317;

View file

@ -32,7 +32,7 @@
+obj-$(CONFIG_NET_VENDOR_AR231X) += ar231x.o +obj-$(CONFIG_NET_VENDOR_AR231X) += ar231x.o
--- /dev/null --- /dev/null
+++ b/drivers/net/ethernet/ar231x/ar231x.c +++ b/drivers/net/ethernet/ar231x/ar231x.c
@@ -0,0 +1,1256 @@ @@ -0,0 +1,1255 @@
+/* +/*
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device. + * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
+ * + *
@ -744,7 +744,7 @@
+ +
+ return 0; + return 0;
+ +
+ init_error: +init_error:
+ ar231x_init_cleanup(dev); + ar231x_init_cleanup(dev);
+ return ecode; + return ecode;
+} +}
@ -1213,8 +1213,7 @@
+} +}
+ +
+static int +static int
+ar231x_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, +ar231x_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, u16 value)
+ u16 value)
+{ +{
+ struct net_device *const dev = bus->priv; + struct net_device *const dev = bus->priv;
+ struct ar231x_private *sp = netdev_priv(dev); + struct ar231x_private *sp = netdev_priv(dev);

View file

@ -23,7 +23,7 @@
--- /dev/null --- /dev/null
+++ b/drivers/mtd/devices/ar2315.c +++ b/drivers/mtd/devices/ar2315.c
@@ -0,0 +1,514 @@ @@ -0,0 +1,515 @@
+ +
+/* +/*
+ * MTD driver for the SPI Flash Memory support on Atheros AR2315 + * MTD driver for the SPI Flash Memory support on Atheros AR2315
@ -118,6 +118,7 @@
+ __s8 tx_cnt; + __s8 tx_cnt;
+ __s8 rx_cnt; + __s8 rx_cnt;
+}; +};
+
+const struct opcodes stm_opcodes[] = { +const struct opcodes stm_opcodes[] = {
+ [SPI_WRITE_ENABLE] = {STM_OP_WR_ENABLE, 1, 0}, + [SPI_WRITE_ENABLE] = {STM_OP_WR_ENABLE, 1, 0},
+ [SPI_WRITE_DISABLE] = {STM_OP_WR_DISABLE, 1, 0}, + [SPI_WRITE_DISABLE] = {STM_OP_WR_DISABLE, 1, 0},

View file

@ -1,6 +1,6 @@
--- /dev/null --- /dev/null
+++ b/drivers/watchdog/ar2315-wtd.c +++ b/drivers/watchdog/ar2315-wtd.c
@@ -0,0 +1,199 @@ @@ -0,0 +1,197 @@
+/* +/*
+ * This program is free software; you can redistribute it and/or modify + * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by + * it under the terms of the GNU General Public License as published by
@ -107,14 +107,13 @@
+ +
+ switch (cmd) { + switch (cmd) {
+ case WDIOC_GETSUPPORT: + case WDIOC_GETSUPPORT:
+ ret = copy_to_user((struct watchdog_info __user *)arg, &ident, sizeof(ident)) ? -EFAULT : 0; + ret = copy_to_user((void __user *)arg, &ident, sizeof(ident)) ?
+ -EFAULT : 0;
+ break; + break;
+
+ case WDIOC_KEEPALIVE: + case WDIOC_KEEPALIVE:
+ ar2315_wdt_enable(); + ar2315_wdt_enable();
+ ret = 0; + ret = 0;
+ break; + break;
+
+ case WDIOC_SETTIMEOUT: + case WDIOC_SETTIMEOUT:
+ ret = get_user(new_wdt_timeout, (int __user *)arg); + ret = get_user(new_wdt_timeout, (int __user *)arg);
+ if (ret) + if (ret)
@ -122,7 +121,6 @@
+ wdt_timeout = HEARTBEAT(new_wdt_timeout); + wdt_timeout = HEARTBEAT(new_wdt_timeout);
+ ar2315_wdt_enable(); + ar2315_wdt_enable();
+ break; + break;
+
+ case WDIOC_GETTIMEOUT: + case WDIOC_GETTIMEOUT:
+ ret = put_user(wdt_timeout, (int __user *)arg); + ret = put_user(wdt_timeout, (int __user *)arg);
+ break; + break;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/ar231x/ar231x.c --- a/drivers/net/ethernet/ar231x/ar231x.c
+++ b/drivers/net/ethernet/ar231x/ar231x.c +++ b/drivers/net/ethernet/ar231x/ar231x.c
@@ -1273,7 +1273,7 @@ static int ar231x_mdiobus_probe (struct @@ -1272,7 +1272,7 @@ static int ar231x_mdiobus_probe (struct
BUG_ON(!phydev); BUG_ON(!phydev);
BUG_ON(phydev->attached_dev); BUG_ON(phydev->attached_dev);