Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207878
b: refs/heads/master
c: 99dd3f6
h: refs/heads/master
v: v3
  • Loading branch information
jianwei.yang authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 188c45c commit 890cc11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 225109957a74c571c49e860fcc4e81fa6df1079d
refs/heads/master: 99dd3f6b7e2ef5179f67503a401a99141708687a
13 changes: 11 additions & 2 deletions trunk/drivers/serial/mrst_max3110.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ static int serial_m3110_probe(struct spi_device *spi)
struct uart_max3110 *max;
int ret;
unsigned char *buffer;

u16 res;
max = kzalloc(sizeof(*max), GFP_KERNEL);
if (!max)
return -ENOMEM;
Expand Down Expand Up @@ -753,7 +753,16 @@ static int serial_m3110_probe(struct spi_device *spi)

max->cur_conf = 0;
atomic_set(&max->irq_pending, 0);

/* Check if reading configuration register returns something sane */

res = RC_TAG;
ret = max3110_write_then_read(max, (u8 *)&res, (u8 *)&res, 2, 0);
if (ret < 0 || res == 0 || res == 0xffff) {
printk(KERN_ERR "MAX3111 deemed not present (conf reg %04x)",
res);
ret = -ENODEV;
goto err_get_page;
}
buffer = (unsigned char *)__get_free_page(GFP_KERNEL);
if (!buffer) {
ret = -ENOMEM;
Expand Down

0 comments on commit 890cc11

Please sign in to comment.