diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-01-05 11:14:22 -0500 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-01-05 11:14:22 -0500 |
commit | 4209324a74fd234fa44bb18a3331356e41df773a (patch) | |
tree | 63152c5482ceb45f1440a8c0659b191ee905eaf3 /arch/avr32/boards | |
parent | 0e490050902adaca9b30275ec9a544a786bf2db8 (diff) |
avr32: data param to at32_add_device_mci() must be non-NULL
at32_add_device_mci() will refuse to add the mci device if the data
parameter is NULL. Fix up the favr-32 and hammerhead boards so that this
doesn't happen.
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Alex Raimondi <mailinglist@miromico.ch>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r-- | arch/avr32/boards/favr-32/setup.c | 11 | ||||
-rw-r--r-- | arch/avr32/boards/hammerhead/setup.c | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index 1a12930df8e7..745c408c2ac5 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/linkage.h> | 17 | #include <linux/linkage.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/leds.h> | 19 | #include <linux/leds.h> |
20 | #include <linux/atmel-mci.h> | ||
20 | #include <linux/atmel-pwm-bl.h> | 21 | #include <linux/atmel-pwm-bl.h> |
21 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
22 | #include <linux/spi/ads7846.h> | 23 | #include <linux/spi/ads7846.h> |
@@ -79,6 +80,14 @@ static struct spi_board_info __initdata spi1_board_info[] = { | |||
79 | }, | 80 | }, |
80 | }; | 81 | }; |
81 | 82 | ||
83 | static struct mci_platform_data __initdata mci0_data = { | ||
84 | .slot[0] = { | ||
85 | .bus_width = 4, | ||
86 | .detect_pin = -ENODEV, | ||
87 | .wp_pin = -ENODEV, | ||
88 | }, | ||
89 | }; | ||
90 | |||
82 | static struct fb_videomode __initdata lb104v03_modes[] = { | 91 | static struct fb_videomode __initdata lb104v03_modes[] = { |
83 | { | 92 | { |
84 | .name = "640x480 @ 50", | 93 | .name = "640x480 @ 50", |
@@ -321,7 +330,7 @@ static int __init favr32_init(void) | |||
321 | 330 | ||
322 | at32_add_device_pwm(1 << atmel_pwm_bl_pdata.pwm_channel); | 331 | at32_add_device_pwm(1 << atmel_pwm_bl_pdata.pwm_channel); |
323 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); | 332 | at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); |
324 | at32_add_device_mci(0, NULL); | 333 | at32_add_device_mci(0, &mci0_data); |
325 | at32_add_device_usba(0, NULL); | 334 | at32_add_device_usba(0, NULL); |
326 | at32_add_device_lcdc(0, &favr32_lcdc_data, fbmem_start, fbmem_size, 0); | 335 | at32_add_device_lcdc(0, &favr32_lcdc_data, fbmem_start, fbmem_size, 0); |
327 | 336 | ||
diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c index af45c26c5ff9..4d2fe82b2029 100644 --- a/arch/avr32/boards/hammerhead/setup.c +++ b/arch/avr32/boards/hammerhead/setup.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/atmel-mci.h> | ||
10 | #include <linux/clk.h> | 11 | #include <linux/clk.h> |
11 | #include <linux/fb.h> | 12 | #include <linux/fb.h> |
12 | #include <linux/etherdevice.h> | 13 | #include <linux/etherdevice.h> |
@@ -86,6 +87,14 @@ struct atmel_lcdfb_info __initdata hammerhead_lcdc_data = { | |||
86 | }; | 87 | }; |
87 | #endif | 88 | #endif |
88 | 89 | ||
90 | static struct mci_platform_data __initdata mci0_data = { | ||
91 | .slot[0] = { | ||
92 | .bus_width = 4, | ||
93 | .detect_pin = -ENODEV, | ||
94 | .wp_pin = -ENODEV, | ||
95 | }, | ||
96 | }; | ||
97 | |||
89 | struct eth_addr { | 98 | struct eth_addr { |
90 | u8 addr[6]; | 99 | u8 addr[6]; |
91 | }; | 100 | }; |
@@ -204,7 +213,7 @@ static int __init hammerhead_init(void) | |||
204 | #ifdef CONFIG_BOARD_HAMMERHEAD_FPGA | 213 | #ifdef CONFIG_BOARD_HAMMERHEAD_FPGA |
205 | at32_add_device_hh_fpga(); | 214 | at32_add_device_hh_fpga(); |
206 | #endif | 215 | #endif |
207 | at32_add_device_mci(0, NULL); | 216 | at32_add_device_mci(0, &mci0_data); |
208 | 217 | ||
209 | #ifdef CONFIG_BOARD_HAMMERHEAD_USB | 218 | #ifdef CONFIG_BOARD_HAMMERHEAD_USB |
210 | at32_add_device_usba(0, NULL); | 219 | at32_add_device_usba(0, NULL); |