diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/drm/i915_dma.c | 14 | ||||
-rw-r--r-- | drivers/char/drm/i915_drv.h | 1 | ||||
-rw-r--r-- | drivers/char/hvc_lguest.c | 1 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 2 | ||||
-rw-r--r-- | drivers/char/keyboard.c | 4 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 5 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 2 | ||||
-rw-r--r-- | drivers/char/sonypi.c | 7 | ||||
-rw-r--r-- | drivers/char/synclink_gt.c | 4 | ||||
-rw-r--r-- | drivers/char/tpm/tpm.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm.h | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_atmel.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_atmel.h | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_bios.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_nsc.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 2 | ||||
-rw-r--r-- | drivers/char/tty_io.c | 56 | ||||
-rw-r--r-- | drivers/char/watchdog/alim1535_wdt.c | 7 | ||||
-rw-r--r-- | drivers/char/watchdog/eurotechwdt.c | 13 |
19 files changed, 100 insertions, 30 deletions
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index 3359cc2b9736..8e7d713a5a15 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c | |||
@@ -184,6 +184,8 @@ static int i915_initialize(struct drm_device * dev, | |||
184 | * private backbuffer/depthbuffer usage. | 184 | * private backbuffer/depthbuffer usage. |
185 | */ | 185 | */ |
186 | dev_priv->use_mi_batchbuffer_start = 0; | 186 | dev_priv->use_mi_batchbuffer_start = 0; |
187 | if (IS_I965G(dev)) /* 965 doesn't support older method */ | ||
188 | dev_priv->use_mi_batchbuffer_start = 1; | ||
187 | 189 | ||
188 | /* Allow hardware batchbuffers unless told otherwise. | 190 | /* Allow hardware batchbuffers unless told otherwise. |
189 | */ | 191 | */ |
@@ -517,8 +519,13 @@ static int i915_dispatch_batchbuffer(struct drm_device * dev, | |||
517 | 519 | ||
518 | if (dev_priv->use_mi_batchbuffer_start) { | 520 | if (dev_priv->use_mi_batchbuffer_start) { |
519 | BEGIN_LP_RING(2); | 521 | BEGIN_LP_RING(2); |
520 | OUT_RING(MI_BATCH_BUFFER_START | (2 << 6)); | 522 | if (IS_I965G(dev)) { |
521 | OUT_RING(batch->start | MI_BATCH_NON_SECURE); | 523 | OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | MI_BATCH_NON_SECURE_I965); |
524 | OUT_RING(batch->start); | ||
525 | } else { | ||
526 | OUT_RING(MI_BATCH_BUFFER_START | (2 << 6)); | ||
527 | OUT_RING(batch->start | MI_BATCH_NON_SECURE); | ||
528 | } | ||
522 | ADVANCE_LP_RING(); | 529 | ADVANCE_LP_RING(); |
523 | } else { | 530 | } else { |
524 | BEGIN_LP_RING(4); | 531 | BEGIN_LP_RING(4); |
@@ -735,7 +742,8 @@ static int i915_setparam(DRM_IOCTL_ARGS) | |||
735 | 742 | ||
736 | switch (param.param) { | 743 | switch (param.param) { |
737 | case I915_SETPARAM_USE_MI_BATCHBUFFER_START: | 744 | case I915_SETPARAM_USE_MI_BATCHBUFFER_START: |
738 | dev_priv->use_mi_batchbuffer_start = param.value; | 745 | if (!IS_I965G(dev)) |
746 | dev_priv->use_mi_batchbuffer_start = param.value; | ||
739 | break; | 747 | break; |
740 | case I915_SETPARAM_TEX_LRU_LOG_GRANULARITY: | 748 | case I915_SETPARAM_TEX_LRU_LOG_GRANULARITY: |
741 | dev_priv->tex_lru_log_granularity = param.value; | 749 | dev_priv->tex_lru_log_granularity = param.value; |
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index fd918565f4e5..737088bd0780 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
@@ -282,6 +282,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
282 | #define MI_BATCH_BUFFER_START (0x31<<23) | 282 | #define MI_BATCH_BUFFER_START (0x31<<23) |
283 | #define MI_BATCH_BUFFER_END (0xA<<23) | 283 | #define MI_BATCH_BUFFER_END (0xA<<23) |
284 | #define MI_BATCH_NON_SECURE (1) | 284 | #define MI_BATCH_NON_SECURE (1) |
285 | #define MI_BATCH_NON_SECURE_I965 (1<<8) | ||
285 | 286 | ||
286 | #define MI_WAIT_FOR_EVENT ((0x3<<23)) | 287 | #define MI_WAIT_FOR_EVENT ((0x3<<23)) |
287 | #define MI_WAIT_FOR_PLANE_A_FLIP (1<<2) | 288 | #define MI_WAIT_FOR_PLANE_A_FLIP (1<<2) |
diff --git a/drivers/char/hvc_lguest.c b/drivers/char/hvc_lguest.c index feeccbaec438..3d6bd0baa56d 100644 --- a/drivers/char/hvc_lguest.c +++ b/drivers/char/hvc_lguest.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/err.h> | 35 | #include <linux/err.h> |
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/lguest_bus.h> | 37 | #include <linux/lguest_bus.h> |
38 | #include <asm/paravirt.h> | ||
38 | #include "hvc_console.h" | 39 | #include "hvc_console.h" |
39 | 40 | ||
40 | /*D:340 This is our single console input buffer, with associated "struct | 41 | /*D:340 This is our single console input buffer, with associated "struct |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 96d2f9ee42d6..9b07f7851061 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2292,7 +2292,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
2292 | info->irq = irq_of_parse_and_map(dev->node, 0); | 2292 | info->irq = irq_of_parse_and_map(dev->node, 0); |
2293 | info->dev = &dev->dev; | 2293 | info->dev = &dev->dev; |
2294 | 2294 | ||
2295 | dev_dbg(&dev->dev, "addr 0x%lx regsize %ld spacing %ld irq %x\n", | 2295 | dev_dbg(&dev->dev, "addr 0x%lx regsize %d spacing %d irq %x\n", |
2296 | info->io.addr_data, info->io.regsize, info->io.regspacing, | 2296 | info->io.addr_data, info->io.regsize, info->io.regspacing, |
2297 | info->irq); | 2297 | info->irq); |
2298 | 2298 | ||
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 2ce0af1bd588..d95f316afb5a 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -1022,10 +1022,6 @@ static const unsigned short x86_keycodes[256] = | |||
1022 | 308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330, | 1022 | 308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330, |
1023 | 332,340,365,342,343,344,345,346,356,270,341,368,369,370,371,372 }; | 1023 | 332,340,365,342,343,344,345,346,356,270,341,368,369,370,371,372 }; |
1024 | 1024 | ||
1025 | #ifdef CONFIG_MAC_EMUMOUSEBTN | ||
1026 | extern int mac_hid_mouse_emulate_buttons(int, int, int); | ||
1027 | #endif /* CONFIG_MAC_EMUMOUSEBTN */ | ||
1028 | |||
1029 | #ifdef CONFIG_SPARC | 1025 | #ifdef CONFIG_SPARC |
1030 | static int sparc_l1_a_state = 0; | 1026 | static int sparc_l1_a_state = 0; |
1031 | extern void sun_do_break(void); | 1027 | extern void sun_do_break(void); |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index fee58e03dbe2..4177f6db83e9 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -1629,7 +1629,7 @@ static int cmm_open(struct inode *inode, struct file *filp) | |||
1629 | { | 1629 | { |
1630 | struct cm4000_dev *dev; | 1630 | struct cm4000_dev *dev; |
1631 | struct pcmcia_device *link; | 1631 | struct pcmcia_device *link; |
1632 | int rc, minor = iminor(inode); | 1632 | int minor = iminor(inode); |
1633 | 1633 | ||
1634 | if (minor >= CM4000_MAX_DEV) | 1634 | if (minor >= CM4000_MAX_DEV) |
1635 | return -ENODEV; | 1635 | return -ENODEV; |
@@ -1668,7 +1668,6 @@ static int cmm_open(struct inode *inode, struct file *filp) | |||
1668 | start_monitor(dev); | 1668 | start_monitor(dev); |
1669 | 1669 | ||
1670 | link->open = 1; /* only one open per device */ | 1670 | link->open = 1; /* only one open per device */ |
1671 | rc = 0; | ||
1672 | 1671 | ||
1673 | DEBUGP(2, dev, "<- cmm_open\n"); | 1672 | DEBUGP(2, dev, "<- cmm_open\n"); |
1674 | return nonseekable_open(inode, filp); | 1673 | return nonseekable_open(inode, filp); |
@@ -1824,7 +1823,7 @@ static int cm4000_resume(struct pcmcia_device *link) | |||
1824 | 1823 | ||
1825 | static void cm4000_release(struct pcmcia_device *link) | 1824 | static void cm4000_release(struct pcmcia_device *link) |
1826 | { | 1825 | { |
1827 | cmm_cm4000_release(link->priv); /* delay release until device closed */ | 1826 | cmm_cm4000_release(link); /* delay release until device closed */ |
1828 | pcmcia_disable_device(link); | 1827 | pcmcia_disable_device(link); |
1829 | } | 1828 | } |
1830 | 1829 | ||
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index af88181a17f4..b24a3e7bbb9f 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -599,7 +599,7 @@ cs_release: | |||
599 | 599 | ||
600 | static void reader_release(struct pcmcia_device *link) | 600 | static void reader_release(struct pcmcia_device *link) |
601 | { | 601 | { |
602 | cm4040_reader_release(link->priv); | 602 | cm4040_reader_release(link); |
603 | pcmcia_disable_device(link); | 603 | pcmcia_disable_device(link); |
604 | } | 604 | } |
605 | 605 | ||
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 73037a4d3c50..aeec67e27264 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -1147,10 +1147,15 @@ static int sonypi_acpi_remove(struct acpi_device *device, int type) | |||
1147 | return 0; | 1147 | return 0; |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | const static struct acpi_device_id sonypi_device_ids[] = { | ||
1151 | {"SNY6001", 0}, | ||
1152 | {"", 0}, | ||
1153 | }; | ||
1154 | |||
1150 | static struct acpi_driver sonypi_acpi_driver = { | 1155 | static struct acpi_driver sonypi_acpi_driver = { |
1151 | .name = "sonypi", | 1156 | .name = "sonypi", |
1152 | .class = "hkey", | 1157 | .class = "hkey", |
1153 | .ids = "SNY6001", | 1158 | .ids = sonypi_device_ids, |
1154 | .ops = { | 1159 | .ops = { |
1155 | .add = sonypi_acpi_add, | 1160 | .add = sonypi_acpi_add, |
1156 | .remove = sonypi_acpi_remove, | 1161 | .remove = sonypi_acpi_remove, |
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index bbb7f1292665..2f97d2f8f916 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -1565,6 +1565,9 @@ static int hdlcdev_open(struct net_device *dev) | |||
1565 | int rc; | 1565 | int rc; |
1566 | unsigned long flags; | 1566 | unsigned long flags; |
1567 | 1567 | ||
1568 | if (!try_module_get(THIS_MODULE)) | ||
1569 | return -EBUSY; | ||
1570 | |||
1568 | DBGINFO(("%s hdlcdev_open\n", dev->name)); | 1571 | DBGINFO(("%s hdlcdev_open\n", dev->name)); |
1569 | 1572 | ||
1570 | /* generic HDLC layer open processing */ | 1573 | /* generic HDLC layer open processing */ |
@@ -1634,6 +1637,7 @@ static int hdlcdev_close(struct net_device *dev) | |||
1634 | info->netcount=0; | 1637 | info->netcount=0; |
1635 | spin_unlock_irqrestore(&info->netlock, flags); | 1638 | spin_unlock_irqrestore(&info->netlock, flags); |
1636 | 1639 | ||
1640 | module_put(THIS_MODULE); | ||
1637 | return 0; | 1641 | return 0; |
1638 | } | 1642 | } |
1639 | 1643 | ||
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 9bb542913b86..39564b76d4a3 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Reiner Sailer <sailer@watson.ibm.com> | 7 | * Reiner Sailer <sailer@watson.ibm.com> |
8 | * Kylene Hall <kjhall@us.ibm.com> | 8 | * Kylene Hall <kjhall@us.ibm.com> |
9 | * | 9 | * |
10 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | 10 | * Maintained by: <tpmdd-devel@lists.sourceforge.net> |
11 | * | 11 | * |
12 | * Device driver for TCG/TCPA TPM (trusted platform module). | 12 | * Device driver for TCG/TCPA TPM (trusted platform module). |
13 | * Specifications at www.trustedcomputinggroup.org | 13 | * Specifications at www.trustedcomputinggroup.org |
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index b2e2b002a1bb..d15ccddc92eb 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Reiner Sailer <sailer@watson.ibm.com> | 7 | * Reiner Sailer <sailer@watson.ibm.com> |
8 | * Kylene Hall <kjhall@us.ibm.com> | 8 | * Kylene Hall <kjhall@us.ibm.com> |
9 | * | 9 | * |
10 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | 10 | * Maintained by: <tpmdd-devel@lists.sourceforge.net> |
11 | * | 11 | * |
12 | * Device driver for TCG/TCPA TPM (trusted platform module). | 12 | * Device driver for TCG/TCPA TPM (trusted platform module). |
13 | * Specifications at www.trustedcomputinggroup.org | 13 | * Specifications at www.trustedcomputinggroup.org |
diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c index 1ab0896070be..d0e7926eb486 100644 --- a/drivers/char/tpm/tpm_atmel.c +++ b/drivers/char/tpm/tpm_atmel.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Reiner Sailer <sailer@watson.ibm.com> | 7 | * Reiner Sailer <sailer@watson.ibm.com> |
8 | * Kylene Hall <kjhall@us.ibm.com> | 8 | * Kylene Hall <kjhall@us.ibm.com> |
9 | * | 9 | * |
10 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | 10 | * Maintained by: <tpmdd-devel@lists.sourceforge.net> |
11 | * | 11 | * |
12 | * Device driver for TCG/TCPA TPM (trusted platform module). | 12 | * Device driver for TCG/TCPA TPM (trusted platform module). |
13 | * Specifications at www.trustedcomputinggroup.org | 13 | * Specifications at www.trustedcomputinggroup.org |
diff --git a/drivers/char/tpm/tpm_atmel.h b/drivers/char/tpm/tpm_atmel.h index 9363bcf0a402..6c831f9466b7 100644 --- a/drivers/char/tpm/tpm_atmel.h +++ b/drivers/char/tpm/tpm_atmel.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Authors: | 4 | * Authors: |
5 | * Kylene Hall <kjhall@us.ibm.com> | 5 | * Kylene Hall <kjhall@us.ibm.com> |
6 | * | 6 | * |
7 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | 7 | * Maintained by: <tpmdd-devel@lists.sourceforge.net> |
8 | * | 8 | * |
9 | * Device driver for TCG/TCPA TPM (trusted platform module). | 9 | * Device driver for TCG/TCPA TPM (trusted platform module). |
10 | * Specifications at www.trustedcomputinggroup.org | 10 | * Specifications at www.trustedcomputinggroup.org |
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index 8677fc6a545e..60a2d2630e36 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * Reiner Sailer <sailer@watson.ibm.com> | 7 | * Reiner Sailer <sailer@watson.ibm.com> |
8 | * Kylene Hall <kjhall@us.ibm.com> | 8 | * Kylene Hall <kjhall@us.ibm.com> |
9 | * | 9 | * |
10 | * Maintained by: <tpmdd-devel@lists.sourceforge.net> | ||
11 | * | ||
10 | * Access to the eventlog extended by the TCG BIOS of PC platform | 12 | * Access to the eventlog extended by the TCG BIOS of PC platform |
11 | * | 13 | * |
12 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c index 608f73071bef..6313326bc41f 100644 --- a/drivers/char/tpm/tpm_nsc.c +++ b/drivers/char/tpm/tpm_nsc.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Reiner Sailer <sailer@watson.ibm.com> | 7 | * Reiner Sailer <sailer@watson.ibm.com> |
8 | * Kylene Hall <kjhall@us.ibm.com> | 8 | * Kylene Hall <kjhall@us.ibm.com> |
9 | * | 9 | * |
10 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | 10 | * Maintained by: <tpmdd-devel@lists.sourceforge.net> |
11 | * | 11 | * |
12 | * Device driver for TCG/TCPA TPM (trusted platform module). | 12 | * Device driver for TCG/TCPA TPM (trusted platform module). |
13 | * Specifications at www.trustedcomputinggroup.org | 13 | * Specifications at www.trustedcomputinggroup.org |
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 483f3f60013c..23fa18a6654c 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -5,6 +5,8 @@ | |||
5 | * Leendert van Doorn <leendert@watson.ibm.com> | 5 | * Leendert van Doorn <leendert@watson.ibm.com> |
6 | * Kylene Hall <kjhall@us.ibm.com> | 6 | * Kylene Hall <kjhall@us.ibm.com> |
7 | * | 7 | * |
8 | * Maintained by: <tpmdd-devel@lists.sourceforge.net> | ||
9 | * | ||
8 | * Device driver for TCG/TCPA TPM (trusted platform module). | 10 | * Device driver for TCG/TCPA TPM (trusted platform module). |
9 | * Specifications at www.trustedcomputinggroup.org | 11 | * Specifications at www.trustedcomputinggroup.org |
10 | * | 12 | * |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index de37ebc3a4cf..51ea93cab6c4 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -369,25 +369,54 @@ static void tty_buffer_free(struct tty_struct *tty, struct tty_buffer *b) | |||
369 | } | 369 | } |
370 | 370 | ||
371 | /** | 371 | /** |
372 | * tty_buffer_flush - flush full tty buffers | 372 | * __tty_buffer_flush - flush full tty buffers |
373 | * @tty: tty to flush | 373 | * @tty: tty to flush |
374 | * | 374 | * |
375 | * flush all the buffers containing receive data | 375 | * flush all the buffers containing receive data. Caller must |
376 | * hold the buffer lock and must have ensured no parallel flush to | ||
377 | * ldisc is running. | ||
376 | * | 378 | * |
377 | * Locking: none | 379 | * Locking: Caller must hold tty->buf.lock |
378 | */ | 380 | */ |
379 | 381 | ||
380 | static void tty_buffer_flush(struct tty_struct *tty) | 382 | static void __tty_buffer_flush(struct tty_struct *tty) |
381 | { | 383 | { |
382 | struct tty_buffer *thead; | 384 | struct tty_buffer *thead; |
383 | unsigned long flags; | ||
384 | 385 | ||
385 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
386 | while((thead = tty->buf.head) != NULL) { | 386 | while((thead = tty->buf.head) != NULL) { |
387 | tty->buf.head = thead->next; | 387 | tty->buf.head = thead->next; |
388 | tty_buffer_free(tty, thead); | 388 | tty_buffer_free(tty, thead); |
389 | } | 389 | } |
390 | tty->buf.tail = NULL; | 390 | tty->buf.tail = NULL; |
391 | } | ||
392 | |||
393 | /** | ||
394 | * tty_buffer_flush - flush full tty buffers | ||
395 | * @tty: tty to flush | ||
396 | * | ||
397 | * flush all the buffers containing receive data. If the buffer is | ||
398 | * being processed by flush_to_ldisc then we defer the processing | ||
399 | * to that function | ||
400 | * | ||
401 | * Locking: none | ||
402 | */ | ||
403 | |||
404 | static void tty_buffer_flush(struct tty_struct *tty) | ||
405 | { | ||
406 | unsigned long flags; | ||
407 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
408 | |||
409 | /* If the data is being pushed to the tty layer then we can't | ||
410 | process it here. Instead set a flag and the flush_to_ldisc | ||
411 | path will process the flush request before it exits */ | ||
412 | if (test_bit(TTY_FLUSHING, &tty->flags)) { | ||
413 | set_bit(TTY_FLUSHPENDING, &tty->flags); | ||
414 | spin_unlock_irqrestore(&tty->buf.lock, flags); | ||
415 | wait_event(tty->read_wait, | ||
416 | test_bit(TTY_FLUSHPENDING, &tty->flags) == 0); | ||
417 | return; | ||
418 | } else | ||
419 | __tty_buffer_flush(tty); | ||
391 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 420 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
392 | } | 421 | } |
393 | 422 | ||
@@ -3594,6 +3623,7 @@ static void flush_to_ldisc(struct work_struct *work) | |||
3594 | return; | 3623 | return; |
3595 | 3624 | ||
3596 | spin_lock_irqsave(&tty->buf.lock, flags); | 3625 | spin_lock_irqsave(&tty->buf.lock, flags); |
3626 | set_bit(TTY_FLUSHING, &tty->flags); /* So we know a flush is running */ | ||
3597 | head = tty->buf.head; | 3627 | head = tty->buf.head; |
3598 | if (head != NULL) { | 3628 | if (head != NULL) { |
3599 | tty->buf.head = NULL; | 3629 | tty->buf.head = NULL; |
@@ -3607,6 +3637,11 @@ static void flush_to_ldisc(struct work_struct *work) | |||
3607 | tty_buffer_free(tty, tbuf); | 3637 | tty_buffer_free(tty, tbuf); |
3608 | continue; | 3638 | continue; |
3609 | } | 3639 | } |
3640 | /* Ldisc or user is trying to flush the buffers | ||
3641 | we are feeding to the ldisc, stop feeding the | ||
3642 | line discipline as we want to empty the queue */ | ||
3643 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) | ||
3644 | break; | ||
3610 | if (!tty->receive_room) { | 3645 | if (!tty->receive_room) { |
3611 | schedule_delayed_work(&tty->buf.work, 1); | 3646 | schedule_delayed_work(&tty->buf.work, 1); |
3612 | break; | 3647 | break; |
@@ -3620,8 +3655,17 @@ static void flush_to_ldisc(struct work_struct *work) | |||
3620 | disc->receive_buf(tty, char_buf, flag_buf, count); | 3655 | disc->receive_buf(tty, char_buf, flag_buf, count); |
3621 | spin_lock_irqsave(&tty->buf.lock, flags); | 3656 | spin_lock_irqsave(&tty->buf.lock, flags); |
3622 | } | 3657 | } |
3658 | /* Restore the queue head */ | ||
3623 | tty->buf.head = head; | 3659 | tty->buf.head = head; |
3624 | } | 3660 | } |
3661 | /* We may have a deferred request to flush the input buffer, | ||
3662 | if so pull the chain under the lock and empty the queue */ | ||
3663 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) { | ||
3664 | __tty_buffer_flush(tty); | ||
3665 | clear_bit(TTY_FLUSHPENDING, &tty->flags); | ||
3666 | wake_up(&tty->read_wait); | ||
3667 | } | ||
3668 | clear_bit(TTY_FLUSHING, &tty->flags); | ||
3625 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 3669 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
3626 | 3670 | ||
3627 | tty_ldisc_deref(disc); | 3671 | tty_ldisc_deref(disc); |
diff --git a/drivers/char/watchdog/alim1535_wdt.c b/drivers/char/watchdog/alim1535_wdt.c index e3f6a7d0c83d..c404fc69e7e6 100644 --- a/drivers/char/watchdog/alim1535_wdt.c +++ b/drivers/char/watchdog/alim1535_wdt.c | |||
@@ -312,6 +312,7 @@ static int ali_notify_sys(struct notifier_block *this, unsigned long code, void | |||
312 | */ | 312 | */ |
313 | 313 | ||
314 | static struct pci_device_id ali_pci_tbl[] = { | 314 | static struct pci_device_id ali_pci_tbl[] = { |
315 | { PCI_VENDOR_ID_AL, 0x1533, PCI_ANY_ID, PCI_ANY_ID,}, | ||
315 | { PCI_VENDOR_ID_AL, 0x1535, PCI_ANY_ID, PCI_ANY_ID,}, | 316 | { PCI_VENDOR_ID_AL, 0x1535, PCI_ANY_ID, PCI_ANY_ID,}, |
316 | { 0, }, | 317 | { 0, }, |
317 | }; | 318 | }; |
@@ -329,9 +330,11 @@ static int __init ali_find_watchdog(void) | |||
329 | struct pci_dev *pdev; | 330 | struct pci_dev *pdev; |
330 | u32 wdog; | 331 | u32 wdog; |
331 | 332 | ||
332 | /* Check for a 1535 series bridge */ | 333 | /* Check for a 1533/1535 series bridge */ |
333 | pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x1535, NULL); | 334 | pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x1535, NULL); |
334 | if(pdev == NULL) | 335 | if (pdev == NULL) |
336 | pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x1533, NULL); | ||
337 | if (pdev == NULL) | ||
335 | return -ENODEV; | 338 | return -ENODEV; |
336 | pci_dev_put(pdev); | 339 | pci_dev_put(pdev); |
337 | 340 | ||
diff --git a/drivers/char/watchdog/eurotechwdt.c b/drivers/char/watchdog/eurotechwdt.c index b070324e27a6..b14e9d1f164d 100644 --- a/drivers/char/watchdog/eurotechwdt.c +++ b/drivers/char/watchdog/eurotechwdt.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Eurotech CPU-1220/1410 on board WDT driver | 2 | * Eurotech CPU-1220/1410/1420 on board WDT driver |
3 | * | 3 | * |
4 | * (c) Copyright 2001 Ascensit <support@ascensit.com> | 4 | * (c) Copyright 2001 Ascensit <support@ascensit.com> |
5 | * (c) Copyright 2001 Rodolfo Giometti <giometti@ascensit.com> | 5 | * (c) Copyright 2001 Rodolfo Giometti <giometti@ascensit.com> |
@@ -25,6 +25,9 @@ | |||
25 | 25 | ||
26 | /* Changelog: | 26 | /* Changelog: |
27 | * | 27 | * |
28 | * 2001 - Rodolfo Giometti | ||
29 | * Initial release | ||
30 | * | ||
28 | * 2002/04/25 - Rob Radez | 31 | * 2002/04/25 - Rob Radez |
29 | * clean up #includes | 32 | * clean up #includes |
30 | * clean up locking | 33 | * clean up locking |
@@ -33,13 +36,15 @@ | |||
33 | * add WDIOC_GETSTATUS and WDIOC_SETOPTIONS ioctls | 36 | * add WDIOC_GETSTATUS and WDIOC_SETOPTIONS ioctls |
34 | * add expect_close support | 37 | * add expect_close support |
35 | * | 38 | * |
36 | * 2001 - Rodolfo Giometti | ||
37 | * Initial release | ||
38 | * | ||
39 | * 2002.05.30 - Joel Becker <joel.becker@oracle.com> | 39 | * 2002.05.30 - Joel Becker <joel.becker@oracle.com> |
40 | * Added Matt Domsch's nowayout module option. | 40 | * Added Matt Domsch's nowayout module option. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | /* | ||
44 | * The eurotech CPU-1220/1410/1420's watchdog is a part | ||
45 | * of the on-board SUPER I/O device SMSC FDC 37B782. | ||
46 | */ | ||
47 | |||
43 | #include <linux/interrupt.h> | 48 | #include <linux/interrupt.h> |
44 | #include <linux/module.h> | 49 | #include <linux/module.h> |
45 | #include <linux/moduleparam.h> | 50 | #include <linux/moduleparam.h> |