aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/dns323-setup.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2008-05-10 10:30:01 -0400
committerLennert Buytenhek <buytenh@marvell.com>2008-06-22 16:44:39 -0400
commite7068ad337a991fba627148a4a57939fdc1e6a2d (patch)
tree6fcfe2a48ffe83b8ccb9539333ee6c2b60d779d7 /arch/arm/mach-orion5x/dns323-setup.c
parentf91a8dcc25398c5d708056de081d6cebf3f2023e (diff)
[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: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Russell King <linux@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-orion5x/dns323-setup.c')
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 27ce967ab9e5..ec53f866ed11 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -119,7 +119,7 @@ static struct mtd_partition dns323_partitions[] = {
119 .name = "u-boot", 119 .name = "u-boot",
120 .size = 0x00030000, 120 .size = 0x00030000,
121 .offset = 0x007d0000, 121 .offset = 0x007d0000,
122 } 122 },
123}; 123};
124 124
125static struct physmap_flash_data dns323_nor_flash_data = { 125static struct physmap_flash_data dns323_nor_flash_data = {
@@ -137,7 +137,9 @@ static struct resource dns323_nor_flash_resource = {
137static struct platform_device dns323_nor_flash = { 137static struct platform_device dns323_nor_flash = {
138 .name = "physmap-flash", 138 .name = "physmap-flash",
139 .id = 0, 139 .id = 0,
140 .dev = { .platform_data = &dns323_nor_flash_data, }, 140 .dev = {
141 .platform_data = &dns323_nor_flash_data,
142 },
141 .resource = &dns323_nor_flash_resource, 143 .resource = &dns323_nor_flash_resource,
142 .num_resources = 1, 144 .num_resources = 1,
143}; 145};
@@ -170,7 +172,9 @@ static struct gpio_led_platform_data dns323_led_data = {
170static struct platform_device dns323_gpio_leds = { 172static struct platform_device dns323_gpio_leds = {
171 .name = "leds-gpio", 173 .name = "leds-gpio",
172 .id = -1, 174 .id = -1,
173 .dev = { .platform_data = &dns323_led_data, }, 175 .dev = {
176 .platform_data = &dns323_led_data,
177 },
174}; 178};
175 179
176/**************************************************************************** 180/****************************************************************************
@@ -183,25 +187,26 @@ static struct gpio_keys_button dns323_buttons[] = {
183 .gpio = DNS323_GPIO_KEY_RESET, 187 .gpio = DNS323_GPIO_KEY_RESET,
184 .desc = "Reset Button", 188 .desc = "Reset Button",
185 .active_low = 1, 189 .active_low = 1,
186 }, 190 }, {
187 {
188 .code = KEY_POWER, 191 .code = KEY_POWER,
189 .gpio = DNS323_GPIO_KEY_POWER, 192 .gpio = DNS323_GPIO_KEY_POWER,
190 .desc = "Power Button", 193 .desc = "Power Button",
191 .active_low = 1, 194 .active_low = 1,
192 } 195 },
193}; 196};
194 197
195static struct gpio_keys_platform_data dns323_button_data = { 198static struct gpio_keys_platform_data dns323_button_data = {
196 .buttons = dns323_buttons, 199 .buttons = dns323_buttons,
197 .nbuttons = ARRAY_SIZE(dns323_buttons), 200 .nbuttons = ARRAY_SIZE(dns323_buttons),
198}; 201};
199 202
200static struct platform_device dns323_button_device = { 203static struct platform_device dns323_button_device = {
201 .name = "gpio-keys", 204 .name = "gpio-keys",
202 .id = -1, 205 .id = -1,
203 .num_resources = 0, 206 .num_resources = 0,
204 .dev = { .platform_data = &dns323_button_data, }, 207 .dev = {
208 .platform_data = &dns323_button_data,
209 },
205}; 210};
206 211
207/**************************************************************************** 212/****************************************************************************
@@ -225,17 +230,15 @@ static struct platform_device *dns323_plat_devices[] __initdata = {
225static struct i2c_board_info __initdata dns323_i2c_devices[] = { 230static struct i2c_board_info __initdata dns323_i2c_devices[] = {
226 { 231 {
227 I2C_BOARD_INFO("g760a", 0x3e), 232 I2C_BOARD_INFO("g760a", 0x3e),
228 },
229#if 0 233#if 0
230 /* this entry requires the new-style driver model lm75 driver, 234 /* this entry requires the new-style driver model lm75 driver,
231 * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */ 235 * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
232 { 236 }, {
233 I2C_BOARD_INFO("g751", 0x48), 237 I2C_BOARD_INFO("g751", 0x48),
234 },
235#endif 238#endif
236 { 239 }, {
237 I2C_BOARD_INFO("m41t80", 0x68), 240 I2C_BOARD_INFO("m41t80", 0x68),
238 } 241 },
239}; 242};
240 243
241/* DNS-323 specific power off method */ 244/* DNS-323 specific power off method */
@@ -292,8 +295,8 @@ static void __init dns323_init(void)
292 orion5x_gpio_set_valid_pins(0x07f6); 295 orion5x_gpio_set_valid_pins(0x07f6);
293 296
294 /* register dns323 specific power-off method */ 297 /* register dns323 specific power-off method */
295 if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0) 298 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
296 || (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)) 299 gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
297 pr_err("DNS323: failed to setup power-off GPIO\n"); 300 pr_err("DNS323: failed to setup power-off GPIO\n");
298 301
299 pm_power_off = dns323_power_off; 302 pm_power_off = dns323_power_off;