Skip to content

Commit

Permalink
Blackfin SPI Driver: SPI slave select code cleanup
Browse files Browse the repository at this point in the history
- remove duplicated definition MAX_SPI_SSEL

- remove unnecessary array size

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Apr 7, 2009
1 parent b31e27a commit 4160bde
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ static void cs_deactive(struct driver_data *drv_data, struct chip_data *chip)
udelay(chip->cs_chg_udelay);
}

#define MAX_SPI_SSEL 7

/* stop controller and re-config current chip*/
static void restore_state(struct driver_data *drv_data)
{
Expand Down Expand Up @@ -1001,7 +999,7 @@ static int transfer(struct spi_device *spi, struct spi_message *msg)

#define MAX_SPI_SSEL 7

static u16 ssel[3][MAX_SPI_SSEL] = {
static u16 ssel[][MAX_SPI_SSEL] = {
{P_SPI0_SSEL1, P_SPI0_SSEL2, P_SPI0_SSEL3,
P_SPI0_SSEL4, P_SPI0_SSEL5,
P_SPI0_SSEL6, P_SPI0_SSEL7},
Expand Down

0 comments on commit 4160bde

Please sign in to comment.