Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7068ad3 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Lennert Buytenhek
Browse files

[ARM] Orion: fix various whitespace and coding style issues



More cosmetic cleanup:
- Replace 8-space indents by proper tab indents.
- In structure initialisers, use a trailing comma for every member.
- Collapse "},\n{" in structure initialiers to "}, {".

Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Acked-by: default avatarRussell King <linux@arm.linux.org.uk>
parent f91a8dcc
Loading
Loading
Loading
Loading
+40 −51
Original line number Diff line number Diff line
@@ -39,25 +39,22 @@ static struct map_desc orion5x_io_desc[] __initdata = {
		.virtual	= ORION5X_REGS_VIRT_BASE,
		.pfn		= __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
		.length		= ORION5X_REGS_SIZE,
		.type		= MT_DEVICE
	},
	{
		.type		= MT_DEVICE,
	}, {
		.virtual	= ORION5X_PCIE_IO_VIRT_BASE,
		.pfn		= __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
		.length		= ORION5X_PCIE_IO_SIZE,
		.type		= MT_DEVICE
	},
	{
		.type		= MT_DEVICE,
	}, {
		.virtual	= ORION5X_PCI_IO_VIRT_BASE,
		.pfn		= __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
		.length		= ORION5X_PCI_IO_SIZE,
		.type		= MT_DEVICE
	},
	{
		.type		= MT_DEVICE,
	}, {
		.virtual	= ORION5X_PCIE_WA_VIRT_BASE,
		.pfn		= __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
		.length		= ORION5X_PCIE_WA_SIZE,
		.type		= MT_DEVICE
		.type		= MT_DEVICE,
	},
};

@@ -75,18 +72,15 @@ static struct resource orion5x_uart_resources[] = {
		.start		= UART0_PHYS_BASE,
		.end		= UART0_PHYS_BASE + 0xff,
		.flags		= IORESOURCE_MEM,
	},
	{
	}, {
		.start		= IRQ_ORION5X_UART0,
		.end		= IRQ_ORION5X_UART0,
		.flags		= IORESOURCE_IRQ,
	},
	{
	}, {
		.start		= UART1_PHYS_BASE,
		.end		= UART1_PHYS_BASE + 0xff,
		.flags		= IORESOURCE_MEM,
	},
	{
	}, {
		.start		= IRQ_ORION5X_UART1,
		.end		= IRQ_ORION5X_UART1,
		.flags		= IORESOURCE_IRQ,
@@ -102,8 +96,7 @@ static struct plat_serial8250_port orion5x_uart_data[] = {
		.iotype		= UPIO_MEM,
		.regshift	= 2,
		.uartclk	= ORION5X_TCLK,
	},
	{
	}, {
		.mapbase	= UART1_PHYS_BASE,
		.membase	= (char *)UART1_VIRT_BASE,
		.irq		= IRQ_ORION5X_UART1,
@@ -111,8 +104,8 @@ static struct plat_serial8250_port orion5x_uart_data[] = {
		.iotype		= UPIO_MEM,
		.regshift	= 2,
		.uartclk	= ORION5X_TCLK,
	}, {
	},
	{ },
};

static struct platform_device orion5x_uart = {
@@ -134,8 +127,7 @@ static struct resource orion5x_ehci0_resources[] = {
		.start	= ORION5X_USB0_PHYS_BASE,
		.end	= ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
		.flags	= IORESOURCE_MEM,
	},
	{
	}, {
		.start	= IRQ_ORION5X_USB0_CTRL,
		.end	= IRQ_ORION5X_USB0_CTRL,
		.flags	= IORESOURCE_IRQ,
@@ -147,8 +139,7 @@ static struct resource orion5x_ehci1_resources[] = {
		.start	= ORION5X_USB1_PHYS_BASE,
		.end	= ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
		.flags	= IORESOURCE_MEM,
	},
	{
	}, {
		.start	= IRQ_ORION5X_USB1_CTRL,
		.end	= IRQ_ORION5X_USB1_CTRL,
		.flags	= IORESOURCE_IRQ,
@@ -219,7 +210,7 @@ static struct resource orion5x_eth_resources[] = {
		.start	= IRQ_ORION5X_ETH_SUM,
		.end	= IRQ_ORION5X_ETH_SUM,
		.flags	= IORESOURCE_IRQ,
	}
	},
};

static struct platform_device orion5x_eth = {
@@ -255,8 +246,7 @@ static struct resource orion5x_i2c_resources[] = {
		.start	= I2C_PHYS_BASE,
		.end	= I2C_PHYS_BASE + 0x20 -1,
		.flags	= IORESOURCE_MEM,
	},
	{
	}, {
		.name	= "i2c irq",
		.start	= IRQ_ORION5X_I2C,
		.end	= IRQ_ORION5X_I2C,
@@ -283,8 +273,7 @@ static struct resource orion5x_sata_resources[] = {
		.start	= ORION5X_SATA_PHYS_BASE,
		.end	= ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
		.flags	= IORESOURCE_MEM,
        },
	{
	}, {
		.name	= "sata irq",
		.start	= IRQ_ORION5X_SATA,
		.end	= IRQ_ORION5X_SATA,
+5 −8
Original line number Diff line number Diff line
@@ -125,18 +125,15 @@ static struct mtd_partition db88f5281_nand_parts[] = {
		.name = "kernel",
		.offset = 0,
		.size = SZ_2M,
	},
	{
	}, {
		.name = "root",
		.offset = SZ_2M,
		.size = (SZ_16M - SZ_2M),
	},
	{
	}, {
		.name = "user",
		.offset = SZ_16M,
		.size = SZ_8M,
	},
	{
	}, {
		.name = "recovery",
		.offset = (SZ_16M + SZ_8M),
		.size = SZ_8M,
+18 −15
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ static struct mtd_partition dns323_partitions[] = {
		.name	= "u-boot",
		.size	= 0x00030000,
		.offset	= 0x007d0000,
	}
	},
};

static struct physmap_flash_data dns323_nor_flash_data = {
@@ -137,7 +137,9 @@ static struct resource dns323_nor_flash_resource = {
static struct platform_device dns323_nor_flash = {
	.name		= "physmap-flash",
	.id		= 0,
	.dev		= { .platform_data = &dns323_nor_flash_data, },
	.dev		= {
		.platform_data	= &dns323_nor_flash_data,
	},
	.resource	= &dns323_nor_flash_resource,
	.num_resources	= 1,
};
@@ -170,7 +172,9 @@ static struct gpio_led_platform_data dns323_led_data = {
static struct platform_device dns323_gpio_leds = {
	.name		= "leds-gpio",
	.id		= -1,
	.dev		= { .platform_data = &dns323_led_data, },
	.dev		= {
		.platform_data	= &dns323_led_data,
	},
};

/****************************************************************************
@@ -183,13 +187,12 @@ static struct gpio_keys_button dns323_buttons[] = {
		.gpio		= DNS323_GPIO_KEY_RESET,
		.desc		= "Reset Button",
		.active_low	= 1,
	},
	{
	}, {
		.code		= KEY_POWER,
		.gpio		= DNS323_GPIO_KEY_POWER,
		.desc		= "Power Button",
		.active_low	= 1,
	}
	},
};

static struct gpio_keys_platform_data dns323_button_data = {
@@ -201,7 +204,9 @@ static struct platform_device dns323_button_device = {
	.name		= "gpio-keys",
	.id		= -1,
	.num_resources	= 0,
	.dev		= { .platform_data  = &dns323_button_data, },
	.dev		= {
		.platform_data	= &dns323_button_data,
	},
};

/****************************************************************************
@@ -225,17 +230,15 @@ static struct platform_device *dns323_plat_devices[] __initdata = {
static struct i2c_board_info __initdata dns323_i2c_devices[] = {
	{
		I2C_BOARD_INFO("g760a", 0x3e),
	},
#if 0
	/* this entry requires the new-style driver model lm75 driver,
	 * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
	{
	}, {
		I2C_BOARD_INFO("g751", 0x48),
	},
#endif
	{
	}, {
		I2C_BOARD_INFO("m41t80", 0x68),
	}
	},
};

/* DNS-323 specific power off method */
@@ -292,8 +295,8 @@ static void __init dns323_init(void)
	orion5x_gpio_set_valid_pins(0x07f6);

	/* register dns323 specific power-off method */
	if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0)
	    || (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0))
	if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
	    gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
		pr_err("DNS323: failed to setup power-off GPIO\n");

	pm_power_off = dns323_power_off;
+3 −5
Original line number Diff line number Diff line
@@ -53,13 +53,11 @@ static struct mtd_partition kurobox_pro_nand_parts[] = {
		.name	= "uImage",
		.offset	= 0,
		.size	= SZ_4M,
	},
	{
	}, {
		.name	= "rootfs",
		.offset	= SZ_4M,
		.size	= SZ_64M,
	},
	{
	}, {
		.name	= "extra",
		.offset	= SZ_4M + SZ_64M,
		.size	= SZ_256M - (SZ_4M + SZ_64M),
+2 −1
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ static int __init rd88f5182_dbgled_init(void)

		leds_event = rd88f5182_dbgled_event;
	}

	return 0;
}

Loading