diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 3 | ||||
| -rw-r--r-- | drivers/s390/char/sclp.c | 5 | ||||
| -rw-r--r-- | drivers/s390/char/sclp_cmd.c | 5 | ||||
| -rw-r--r-- | drivers/usb/gadget/pxa25x_udc.c | 4 | ||||
| -rw-r--r-- | drivers/watchdog/at91rm9200_wdt.c | 4 | ||||
| -rw-r--r-- | drivers/watchdog/at91sam9_wdt.c | 1 |
6 files changed, 16 insertions, 6 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index c98c1570a40b..47a33cec3793 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
| @@ -139,7 +139,8 @@ static int atmel_nand_device_ready(struct mtd_info *mtd) | |||
| 139 | struct nand_chip *nand_chip = mtd->priv; | 139 | struct nand_chip *nand_chip = mtd->priv; |
| 140 | struct atmel_nand_host *host = nand_chip->priv; | 140 | struct atmel_nand_host *host = nand_chip->priv; |
| 141 | 141 | ||
| 142 | return gpio_get_value(host->board->rdy_pin); | 142 | return gpio_get_value(host->board->rdy_pin) ^ |
| 143 | !!host->board->rdy_pin_active_low; | ||
| 143 | } | 144 | } |
| 144 | 145 | ||
| 145 | /* | 146 | /* |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 1fd8f2193ed8..4377e93a43d7 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
| @@ -280,8 +280,11 @@ sclp_dispatch_evbufs(struct sccb_header *sccb) | |||
| 280 | rc = 0; | 280 | rc = 0; |
| 281 | for (offset = sizeof(struct sccb_header); offset < sccb->length; | 281 | for (offset = sizeof(struct sccb_header); offset < sccb->length; |
| 282 | offset += evbuf->length) { | 282 | offset += evbuf->length) { |
| 283 | /* Search for event handler */ | ||
| 284 | evbuf = (struct evbuf_header *) ((addr_t) sccb + offset); | 283 | evbuf = (struct evbuf_header *) ((addr_t) sccb + offset); |
| 284 | /* Check for malformed hardware response */ | ||
| 285 | if (evbuf->length == 0) | ||
| 286 | break; | ||
| 287 | /* Search for event handler */ | ||
| 285 | reg = NULL; | 288 | reg = NULL; |
| 286 | list_for_each(l, &sclp_reg_list) { | 289 | list_for_each(l, &sclp_reg_list) { |
| 287 | reg = list_entry(l, struct sclp_register, list); | 290 | reg = list_entry(l, struct sclp_register, list); |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index 506390496416..77ab6e34a100 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/memory.h> | 19 | #include <linux/memory.h> |
| 20 | #include <asm/chpid.h> | 20 | #include <asm/chpid.h> |
| 21 | #include <asm/sclp.h> | 21 | #include <asm/sclp.h> |
| 22 | #include <asm/setup.h> | ||
| 22 | 23 | ||
| 23 | #include "sclp.h" | 24 | #include "sclp.h" |
| 24 | 25 | ||
| @@ -474,6 +475,10 @@ static void __init add_memory_merged(u16 rn) | |||
| 474 | goto skip_add; | 475 | goto skip_add; |
| 475 | if (start + size > VMEM_MAX_PHYS) | 476 | if (start + size > VMEM_MAX_PHYS) |
| 476 | size = VMEM_MAX_PHYS - start; | 477 | size = VMEM_MAX_PHYS - start; |
| 478 | if (memory_end_set && (start >= memory_end)) | ||
| 479 | goto skip_add; | ||
| 480 | if (memory_end_set && (start + size > memory_end)) | ||
| 481 | size = memory_end - start; | ||
| 477 | add_memory(0, start, size); | 482 | add_memory(0, start, size); |
| 478 | skip_add: | 483 | skip_add: |
| 479 | first_rn = rn; | 484 | first_rn = rn; |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index 9b36205c5759..0ce4e2819847 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
| @@ -904,8 +904,8 @@ static void pxa25x_ep_fifo_flush(struct usb_ep *_ep) | |||
| 904 | 904 | ||
| 905 | /* most IN status is the same, but ISO can't stall */ | 905 | /* most IN status is the same, but ISO can't stall */ |
| 906 | *ep->reg_udccs = UDCCS_BI_TPC|UDCCS_BI_FTF|UDCCS_BI_TUR | 906 | *ep->reg_udccs = UDCCS_BI_TPC|UDCCS_BI_FTF|UDCCS_BI_TUR |
| 907 | | (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) | 907 | | (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC |
| 908 | ? 0 : UDCCS_BI_SST; | 908 | ? 0 : UDCCS_BI_SST); |
| 909 | } | 909 | } |
| 910 | 910 | ||
| 911 | 911 | ||
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index 5531691f46ea..e35d54589232 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c | |||
| @@ -107,10 +107,10 @@ static int at91_wdt_close(struct inode *inode, struct file *file) | |||
| 107 | static int at91_wdt_settimeout(int new_time) | 107 | static int at91_wdt_settimeout(int new_time) |
| 108 | { | 108 | { |
| 109 | /* | 109 | /* |
| 110 | * All counting occurs at SLOW_CLOCK / 128 = 0.256 Hz | 110 | * All counting occurs at SLOW_CLOCK / 128 = 256 Hz |
| 111 | * | 111 | * |
| 112 | * Since WDV is a 16-bit counter, the maximum period is | 112 | * Since WDV is a 16-bit counter, the maximum period is |
| 113 | * 65536 / 0.256 = 256 seconds. | 113 | * 65536 / 256 = 256 seconds. |
| 114 | */ | 114 | */ |
| 115 | if ((new_time <= 0) || (new_time > WDT_MAX_TIME)) | 115 | if ((new_time <= 0) || (new_time > WDT_MAX_TIME)) |
| 116 | return -EINVAL; | 116 | return -EINVAL; |
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index b1da287f90ec..a56ac84381b1 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
| 19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
| 20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
| 21 | #include <linux/io.h> | ||
| 21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 22 | #include <linux/miscdevice.h> | 23 | #include <linux/miscdevice.h> |
| 23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
