From: Gabor Juhos Date: Sat, 26 Dec 2009 14:19:05 +0000 (+0000) Subject: ar71xx: use the generic m25p80 registration code for the MZK-W04NU X-Git-Tag: v19.07.0-rc1~32221 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=991a8d4398f1d692bd1394854a87ebdb61b563de;p=openwrt%2Fstaging%2Fhauke.git ar71xx: use the generic m25p80 registration code for the MZK-W04NU SVN-Revision: 18938 --- diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c index a3d71f6242..58b64976d7 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include @@ -21,6 +19,7 @@ #include "dev-ar913x-wmac.h" #include "dev-gpio-buttons.h" #include "dev-leds-gpio.h" +#include "dev-m25p80.h" #define MZK_W04NU_GPIO_LED_USB 0 #define MZK_W04NU_GPIO_LED_STATUS 1 @@ -74,16 +73,6 @@ static struct flash_platform_data mzk_w04nu_flash_data = { #endif }; -static struct spi_board_info mzk_w04nu_spi_info[] = { - { - .bus_num = 0, - .chip_select = 0, - .max_speed_hz = 25000000, - .modalias = "m25p80", - .platform_data = &mzk_w04nu_flash_data, - } -}; - static struct gpio_led mzk_w04nu_leds_gpio[] __initdata = { { .name = "mzk-w04nu:green:status", @@ -157,8 +146,7 @@ static void __init mzk_w04nu_setup(void) ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); - ar71xx_add_device_spi(NULL, mzk_w04nu_spi_info, - ARRAY_SIZE(mzk_w04nu_spi_info)); + ar71xx_add_device_m25p80(&mzk_w04nu_flash_data); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w04nu_leds_gpio), mzk_w04nu_leds_gpio);