Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60796
b: refs/heads/master
c: 9404082
h: refs/heads/master
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Linus Torvalds committed Jul 17, 2007
1 parent 1312730 commit cab1c8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2cac67dd36626128e06e79fc7ca95d544dcdc67
refs/heads/master: 940408289842677cfe9e053a6c423bf3fb922560
11 changes: 6 additions & 5 deletions trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/device.h>
#include <linux/init.h>
#include <linux/cache.h>
#include <linux/mutex.h>
#include <linux/spi/spi.h>


Expand Down Expand Up @@ -185,7 +186,7 @@ struct boardinfo {
};

static LIST_HEAD(board_list);
static DECLARE_MUTEX(board_lock);
static DEFINE_MUTEX(board_lock);


/**
Expand Down Expand Up @@ -292,9 +293,9 @@ spi_register_board_info(struct spi_board_info const *info, unsigned n)
bi->n_board_info = n;
memcpy(bi->board_info, info, n * sizeof *info);

down(&board_lock);
mutex_lock(&board_lock);
list_add_tail(&bi->list, &board_list);
up(&board_lock);
mutex_unlock(&board_lock);
return 0;
}

Expand All @@ -308,7 +309,7 @@ scan_boardinfo(struct spi_master *master)
struct boardinfo *bi;
struct device *dev = master->cdev.dev;

down(&board_lock);
mutex_lock(&board_lock);
list_for_each_entry(bi, &board_list, list) {
struct spi_board_info *chip = bi->board_info;
unsigned n;
Expand All @@ -330,7 +331,7 @@ scan_boardinfo(struct spi_master *master)
(void) spi_new_device(master, chip);
}
}
up(&board_lock);
mutex_unlock(&board_lock);
}

/*-------------------------------------------------------------------------*/
Expand Down

0 comments on commit cab1c8a

Please sign in to comment.