spi flash: fix trivial problems

Fix typos and too big #ifdef.

Signed-off-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
This commit is contained in:
Pavel Machek 2015-04-21 10:37:45 +02:00 committed by Jagannadha Sutradharudu Teki
parent 8c48a68346
commit d15e74f16c

View file

@ -62,11 +62,9 @@ struct spi_slave;
* return 0 - Success, 1 - Failure * return 0 - Success, 1 - Failure
*/ */
struct spi_flash { struct spi_flash {
struct spi_slave *spi;
#ifdef CONFIG_DM_SPI_FLASH #ifdef CONFIG_DM_SPI_FLASH
struct spi_slave *spi;
struct udevice *dev; struct udevice *dev;
#else
struct spi_slave *spi;
#endif #endif
const char *name; const char *name;
u8 dual_flash; u8 dual_flash;
@ -91,13 +89,13 @@ struct spi_flash {
#ifndef CONFIG_DM_SPI_FLASH #ifndef CONFIG_DM_SPI_FLASH
/* /*
* These are not strictly needed for driver model, but keep them here * These are not strictly needed for driver model, but keep them here
* whilt the transition is in progress. * while the transition is in progress.
* *
* Normally each driver would provide its own operations, but for * Normally each driver would provide its own operations, but for
* SPI flash most chips use the same algorithms. One approach is * SPI flash most chips use the same algorithms. One approach is
* to create a 'common' SPI flash device which knows how to talk * to create a 'common' SPI flash device which knows how to talk
* to most devices, and then allow other drivers to be used instead * to most devices, and then allow other drivers to be used instead
* if requird, perhaps with a way of scanning through the list to * if required, perhaps with a way of scanning through the list to
* find the driver that matches the device. * find the driver that matches the device.
*/ */
int (*read)(struct spi_flash *flash, u32 offset, size_t len, void *buf); int (*read)(struct spi_flash *flash, u32 offset, size_t len, void *buf);