aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-01-08 16:34:29 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-13 19:29:56 -0500
commit7111763d391b0c5a949a4f2575aa88cd585f0ff6 (patch)
tree376eef5003b71c6445c02bbe87950b2e365e0758 /drivers
parent8275c642ccdce09a2146d0a9eb022e3698ee927e (diff)
[PATCH] spi: misc fixes
This collects some small SPI patches that seem to be missing from the MM tree: - spi_butterfly kbuild hooks got dropped somehow; this restores them - quick fix for a (theoretical?) m25p80_write() oops noted by Andrew - quick fix for a potential config-specific oops for mtd_dataflash() - minor doc tweaks Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/m25p80.c4
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c2
-rw-r--r--drivers/spi/Kconfig10
-rw-r--r--drivers/spi/Makefile1
4 files changed, 15 insertions, 2 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 45108ed85588..d5f24089be71 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -378,7 +378,9 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
378 378
379 spi_sync(flash->spi, &m); 379 spi_sync(flash->spi, &m);
380 380
381 *retlen += m.actual_length - sizeof(flash->command); 381 if (retlen)
382 *retlen += m.actual_length
383 - sizeof(flash->command);
382 } 384 }
383 } 385 }
384 386
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 99d3a0320fc9..155737e7483f 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -508,7 +508,7 @@ add_dataflash(struct spi_device *spi, char *name,
508 priv->partitioned = 1; 508 priv->partitioned = 1;
509 return add_mtd_partitions(device, parts, nr_parts); 509 return add_mtd_partitions(device, parts, nr_parts);
510 } 510 }
511 } else if (pdata->nr_parts) 511 } else if (pdata && pdata->nr_parts)
512 dev_warn(&spi->dev, "ignoring %d default partitions on %s\n", 512 dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
513 pdata->nr_parts, device->name); 513 pdata->nr_parts, device->name);
514 514
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 9b21c5d77b4a..7a75faeb0526 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -65,6 +65,16 @@ config SPI_BITBANG
65 need it. You only need to select this explicitly to support driver 65 need it. You only need to select this explicitly to support driver
66 modules that aren't part of this kernel tree. 66 modules that aren't part of this kernel tree.
67 67
68config SPI_BUTTERFLY
69 tristate "Parallel port adapter for AVR Butterfly (DEVELOPMENT)"
70 depends on SPI_MASTER && PARPORT && EXPERIMENTAL
71 select SPI_BITBANG
72 help
73 This uses a custom parallel port cable to connect to an AVR
74 Butterfly <http://www.atmel.com/products/avr/butterfly>, an
75 inexpensive battery powered microcontroller evaluation board.
76 This same cable can be used to flash new firmware.
77
68# 78#
69# Add new SPI master controllers in alphabetical order above this line 79# Add new SPI master controllers in alphabetical order above this line
70# 80#
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 5da6a4df4012..c2c87e845abf 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_SPI_MASTER) += spi.o
12 12
13# SPI master controller drivers (bus) 13# SPI master controller drivers (bus)
14obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o 14obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o
15obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o
15# ... add above this line ... 16# ... add above this line ...
16 17
17# SPI protocol drivers (device/link on bus) 18# SPI protocol drivers (device/link on bus)