aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/devices-da8xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/devices-da8xx.c')
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 2d5502d84a22..30da05f22ef4 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -832,7 +832,7 @@ static struct resource da8xx_spi1_resources[] = {
832 }, 832 },
833}; 833};
834 834
835struct davinci_spi_platform_data da8xx_spi_pdata[] = { 835static struct davinci_spi_platform_data da8xx_spi_pdata[] = {
836 [0] = { 836 [0] = {
837 .version = SPI_VERSION_2, 837 .version = SPI_VERSION_2,
838 .intr_line = 1, 838 .intr_line = 1,
@@ -866,20 +866,12 @@ static struct platform_device da8xx_spi_device[] = {
866 }, 866 },
867}; 867};
868 868
869int __init da8xx_register_spi(int instance, const struct spi_board_info *info, 869int __init da8xx_register_spi_bus(int instance, unsigned num_chipselect)
870 unsigned len)
871{ 870{
872 int ret;
873
874 if (instance < 0 || instance > 1) 871 if (instance < 0 || instance > 1)
875 return -EINVAL; 872 return -EINVAL;
876 873
877 ret = spi_register_board_info(info, len); 874 da8xx_spi_pdata[instance].num_chipselect = num_chipselect;
878 if (ret)
879 pr_warning("%s: failed to register board info for spi %d :"
880 " %d\n", __func__, instance, ret);
881
882 da8xx_spi_pdata[instance].num_chipselect = len;
883 875
884 if (instance == 1 && cpu_is_davinci_da850()) { 876 if (instance == 1 && cpu_is_davinci_da850()) {
885 da8xx_spi1_resources[0].start = DA850_SPI1_BASE; 877 da8xx_spi1_resources[0].start = DA850_SPI1_BASE;