Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60783
b: refs/heads/master
c: c06e677
h: refs/heads/master
i:
  60781: d165e7d
  60779: e696b80
  60775: 556d1aa
  60767: 36ab747
v: v3
  • Loading branch information
David Brownell authored and Linus Torvalds committed Jul 17, 2007
1 parent 5ca26e4 commit 221bdc7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dccd573bb02aa011a4a7146c02c409ac0bd722a0
refs/heads/master: c06e677aed0c86480b01faa894967daa8aa3568a
4 changes: 4 additions & 0 deletions trunk/drivers/hwmon/lm70.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ static int __devinit lm70_probe(struct spi_device *spi)
struct lm70 *p_lm70;
int status;

/* signaling is SPI_MODE_0 on a 3-wire link (shared SI/SO) */
if ((spi->mode & (SPI_CPOL|SPI_CPHA)) || !(spi->mode & SPI_3WIRE))
return -EINVAL;

p_lm70 = kzalloc(sizeof *p_lm70, GFP_KERNEL);
if (!p_lm70)
return -ENOMEM;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/spi/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ struct spi_device {
#define SPI_MODE_3 (SPI_CPOL|SPI_CPHA)
#define SPI_CS_HIGH 0x04 /* chipselect active high? */
#define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */
#define SPI_3WIRE 0x10 /* SI/SO signals shared */
u8 bits_per_word;
int irq;
void *controller_state;
Expand Down

0 comments on commit 221bdc7

Please sign in to comment.