aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/thermal.c3
-rw-r--r--drivers/block/paride/pcd.c2
-rw-r--r--drivers/block/paride/pf.c2
-rw-r--r--drivers/char/mxser.c48
-rw-r--r--drivers/char/mxser_new.c45
-rw-r--r--drivers/hwmon/w83627ehf.c14
-rw-r--r--drivers/serial/8250.c8
-rw-r--r--drivers/serial/icom.c9
-rw-r--r--drivers/serial/icom.h1
-rw-r--r--drivers/video/Kconfig2
10 files changed, 51 insertions, 83 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 0ae8b9310cbf..589b98b7b216 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *data)
758 del_timer(&(tz->timer)); 758 del_timer(&(tz->timer));
759 } else { 759 } else {
760 if (timer_pending(&(tz->timer))) 760 if (timer_pending(&(tz->timer)))
761 mod_timer(&(tz->timer), (HZ * sleep_time) / 1000); 761 mod_timer(&(tz->timer),
762 jiffies + (HZ * sleep_time) / 1000);
762 else { 763 else {
763 tz->timer.data = (unsigned long)tz; 764 tz->timer.data = (unsigned long)tz;
764 tz->timer.function = acpi_thermal_run; 765 tz->timer.function = acpi_thermal_run;
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index c852eed91e4b..1eeb8f2cde71 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -140,7 +140,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY};
140#include <linux/blkdev.h> 140#include <linux/blkdev.h>
141#include <asm/uaccess.h> 141#include <asm/uaccess.h>
142 142
143static spinlock_t pcd_lock; 143static DEFINE_SPINLOCK(pcd_lock);
144 144
145module_param(verbose, bool, 0644); 145module_param(verbose, bool, 0644);
146module_param(major, int, 0); 146module_param(major, int, 0);
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index 7cdaa1951260..5826508f6731 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -154,7 +154,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_LUN, D_DLY};
154#include <linux/blkpg.h> 154#include <linux/blkpg.h>
155#include <asm/uaccess.h> 155#include <asm/uaccess.h>
156 156
157static spinlock_t pf_spin_lock; 157static DEFINE_SPINLOCK(pf_spin_lock);
158 158
159module_param(verbose, bool, 0644); 159module_param(verbose, bool, 0644);
160module_param(major, int, 0); 160module_param(major, int, 0);
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index a61fb6da5d03..80a01150b86c 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1338,43 +1338,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
1338 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) 1338 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
1339 * Caller should use TIOCGICOUNT to see which one it was 1339 * Caller should use TIOCGICOUNT to see which one it was
1340 */ 1340 */
1341 case TIOCMIWAIT: { 1341 case TIOCMIWAIT:
1342 DECLARE_WAITQUEUE(wait, current); 1342 spin_lock_irqsave(&info->slock, flags);
1343 int ret; 1343 cnow = info->icount; /* note the counters on entry */
1344 spin_unlock_irqrestore(&info->slock, flags);
1345
1346 wait_event_interruptible(info->delta_msr_wait, ({
1347 cprev = cnow;
1344 spin_lock_irqsave(&info->slock, flags); 1348 spin_lock_irqsave(&info->slock, flags);
1345 cprev = info->icount; /* note the counters on entry */ 1349 cnow = info->icount; /* atomic copy */
1346 spin_unlock_irqrestore(&info->slock, flags); 1350 spin_unlock_irqrestore(&info->slock, flags);
1347 1351
1348 add_wait_queue(&info->delta_msr_wait, &wait); 1352 ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
1349 while (1) { 1353 ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
1350 spin_lock_irqsave(&info->slock, flags); 1354 ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
1351 cnow = info->icount; /* atomic copy */ 1355 ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
1352 spin_unlock_irqrestore(&info->slock, flags); 1356 }));
1353 1357 break;
1354 set_current_state(TASK_INTERRUPTIBLE);
1355 if (((arg & TIOCM_RNG) &&
1356 (cnow.rng != cprev.rng)) ||
1357 ((arg & TIOCM_DSR) &&
1358 (cnow.dsr != cprev.dsr)) ||
1359 ((arg & TIOCM_CD) &&
1360 (cnow.dcd != cprev.dcd)) ||
1361 ((arg & TIOCM_CTS) &&
1362 (cnow.cts != cprev.cts))) {
1363 ret = 0;
1364 break;
1365 }
1366 /* see if a signal did it */
1367 if (signal_pending(current)) {
1368 ret = -ERESTARTSYS;
1369 break;
1370 }
1371 cprev = cnow;
1372 }
1373 current->state = TASK_RUNNING;
1374 remove_wait_queue(&info->delta_msr_wait, &wait);
1375 break;
1376 }
1377 /* NOTREACHED */
1378 /* 1358 /*
1379 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) 1359 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
1380 * Return: write counters to the user passed counter struct 1360 * Return: write counters to the user passed counter struct
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 9af07e4999d5..f7603b6aeb87 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -1758,43 +1758,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
1758 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) 1758 * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
1759 * Caller should use TIOCGICOUNT to see which one it was 1759 * Caller should use TIOCGICOUNT to see which one it was
1760 */ 1760 */
1761 case TIOCMIWAIT: { 1761 case TIOCMIWAIT:
1762 DECLARE_WAITQUEUE(wait, current);
1763 int ret;
1764 spin_lock_irqsave(&info->slock, flags); 1762 spin_lock_irqsave(&info->slock, flags);
1765 cprev = info->icount; /* note the counters on entry */ 1763 cnow = info->icount; /* note the counters on entry */
1766 spin_unlock_irqrestore(&info->slock, flags); 1764 spin_unlock_irqrestore(&info->slock, flags);
1767 1765
1768 add_wait_queue(&info->delta_msr_wait, &wait); 1766 wait_event_interruptible(info->delta_msr_wait, ({
1769 while (1) { 1767 cprev = cnow;
1770 spin_lock_irqsave(&info->slock, flags); 1768 spin_lock_irqsave(&info->slock, flags);
1771 cnow = info->icount; /* atomic copy */ 1769 cnow = info->icount; /* atomic copy */
1772 spin_unlock_irqrestore(&info->slock, flags); 1770 spin_unlock_irqrestore(&info->slock, flags);
1773 1771
1774 set_current_state(TASK_INTERRUPTIBLE); 1772 ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
1775 if (((arg & TIOCM_RNG) && 1773 ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
1776 (cnow.rng != cprev.rng)) || 1774 ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
1777 ((arg & TIOCM_DSR) && 1775 ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
1778 (cnow.dsr != cprev.dsr)) || 1776 }));
1779 ((arg & TIOCM_CD) &&
1780 (cnow.dcd != cprev.dcd)) ||
1781 ((arg & TIOCM_CTS) &&
1782 (cnow.cts != cprev.cts))) {
1783 ret = 0;
1784 break;
1785 }
1786 /* see if a signal did it */
1787 if (signal_pending(current)) {
1788 ret = -ERESTARTSYS;
1789 break;
1790 }
1791 cprev = cnow;
1792 }
1793 current->state = TASK_RUNNING;
1794 remove_wait_queue(&info->delta_msr_wait, &wait);
1795 break; 1777 break;
1796 }
1797 /* NOTREACHED */
1798 /* 1778 /*
1799 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) 1779 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
1800 * Return: write counters to the user passed counter struct 1780 * Return: write counters to the user passed counter struct
@@ -2230,7 +2210,14 @@ end_intr:
2230 port->mon_data.rxcnt += cnt; 2210 port->mon_data.rxcnt += cnt;
2231 port->mon_data.up_rxcnt += cnt; 2211 port->mon_data.up_rxcnt += cnt;
2232 2212
2213 /*
2214 * We are called from an interrupt context with &port->slock
2215 * being held. Drop it temporarily in order to prevent
2216 * recursive locking.
2217 */
2218 spin_unlock(&port->slock);
2233 tty_flip_buffer_push(tty); 2219 tty_flip_buffer_push(tty);
2220 spin_lock(&port->slock);
2234} 2221}
2235 2222
2236static void mxser_transmit_chars(struct mxser_port *port) 2223static void mxser_transmit_chars(struct mxser_port *port)
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 01206ebb1cf2..30a76404f0af 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -121,9 +121,9 @@ superio_exit(void)
121 * ISA constants 121 * ISA constants
122 */ 122 */
123 123
124#define REGION_ALIGNMENT ~7 124#define IOREGION_ALIGNMENT ~7
125#define REGION_OFFSET 5 125#define IOREGION_OFFSET 5
126#define REGION_LENGTH 2 126#define IOREGION_LENGTH 2
127#define ADDR_REG_OFFSET 5 127#define ADDR_REG_OFFSET 5
128#define DATA_REG_OFFSET 6 128#define DATA_REG_OFFSET 6
129 129
@@ -1194,7 +1194,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter)
1194 u8 fan4pin, fan5pin; 1194 u8 fan4pin, fan5pin;
1195 int i, err = 0; 1195 int i, err = 0;
1196 1196
1197 if (!request_region(address + REGION_OFFSET, REGION_LENGTH, 1197 if (!request_region(address + IOREGION_OFFSET, IOREGION_LENGTH,
1198 w83627ehf_driver.driver.name)) { 1198 w83627ehf_driver.driver.name)) {
1199 err = -EBUSY; 1199 err = -EBUSY;
1200 goto exit; 1200 goto exit;
@@ -1322,7 +1322,7 @@ exit_remove:
1322exit_free: 1322exit_free:
1323 kfree(data); 1323 kfree(data);
1324exit_release: 1324exit_release:
1325 release_region(address + REGION_OFFSET, REGION_LENGTH); 1325 release_region(address + IOREGION_OFFSET, IOREGION_LENGTH);
1326exit: 1326exit:
1327 return err; 1327 return err;
1328} 1328}
@@ -1337,7 +1337,7 @@ static int w83627ehf_detach_client(struct i2c_client *client)
1337 1337
1338 if ((err = i2c_detach_client(client))) 1338 if ((err = i2c_detach_client(client)))
1339 return err; 1339 return err;
1340 release_region(client->addr + REGION_OFFSET, REGION_LENGTH); 1340 release_region(client->addr + IOREGION_OFFSET, IOREGION_LENGTH);
1341 kfree(data); 1341 kfree(data);
1342 1342
1343 return 0; 1343 return 0;
@@ -1380,7 +1380,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr)
1380 superio_select(W83627EHF_LD_HWM); 1380 superio_select(W83627EHF_LD_HWM);
1381 val = (superio_inb(SIO_REG_ADDR) << 8) 1381 val = (superio_inb(SIO_REG_ADDR) << 8)
1382 | superio_inb(SIO_REG_ADDR + 1); 1382 | superio_inb(SIO_REG_ADDR + 1);
1383 *addr = val & REGION_ALIGNMENT; 1383 *addr = val & IOREGION_ALIGNMENT;
1384 if (*addr == 0) { 1384 if (*addr == 0) {
1385 superio_exit(); 1385 superio_exit();
1386 return -ENODEV; 1386 return -ENODEV;
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c129a0e8e807..90621c3312bc 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1310,7 +1310,8 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
1310{ 1310{
1311 unsigned int status = serial_in(up, UART_MSR); 1311 unsigned int status = serial_in(up, UART_MSR);
1312 1312
1313 if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI) { 1313 if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI &&
1314 up->port.info != NULL) {
1314 if (status & UART_MSR_TERI) 1315 if (status & UART_MSR_TERI)
1315 up->port.icount.rng++; 1316 up->port.icount.rng++;
1316 if (status & UART_MSR_DDSR) 1317 if (status & UART_MSR_DDSR)
@@ -1333,8 +1334,9 @@ static inline void
1333serial8250_handle_port(struct uart_8250_port *up) 1334serial8250_handle_port(struct uart_8250_port *up)
1334{ 1335{
1335 unsigned int status; 1336 unsigned int status;
1337 unsigned long flags;
1336 1338
1337 spin_lock(&up->port.lock); 1339 spin_lock_irqsave(&up->port.lock, flags);
1338 1340
1339 status = serial_inp(up, UART_LSR); 1341 status = serial_inp(up, UART_LSR);
1340 1342
@@ -1346,7 +1348,7 @@ serial8250_handle_port(struct uart_8250_port *up)
1346 if (status & UART_LSR_THRE) 1348 if (status & UART_LSR_THRE)
1347 transmit_chars(up); 1349 transmit_chars(up);
1348 1350
1349 spin_unlock(&up->port.lock); 1351 spin_unlock_irqrestore(&up->port.lock, flags);
1350} 1352}
1351 1353
1352/* 1354/*
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 41431d0d5512..246c5572667b 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -164,7 +164,7 @@ static void free_port_memory(struct icom_port *icom_port)
164 } 164 }
165} 165}
166 166
167static int __init get_port_memory(struct icom_port *icom_port) 167static int __devinit get_port_memory(struct icom_port *icom_port)
168{ 168{
169 int index; 169 int index;
170 unsigned long stgAddr; 170 unsigned long stgAddr;
@@ -1380,7 +1380,7 @@ static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *i
1380 0x8024 + 2 - 2 * (icom_port->port - 2); 1380 0x8024 + 2 - 2 * (icom_port->port - 2);
1381 } 1381 }
1382} 1382}
1383static int __init icom_load_ports(struct icom_adapter *icom_adapter) 1383static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
1384{ 1384{
1385 struct icom_port *icom_port; 1385 struct icom_port *icom_port;
1386 int port_num; 1386 int port_num;
@@ -1473,7 +1473,7 @@ static void icom_remove_adapter(struct icom_adapter *icom_adapter)
1473 } 1473 }
1474 } 1474 }
1475 1475
1476 free_irq(icom_adapter->irq_number, (void *) icom_adapter); 1476 free_irq(icom_adapter->pci_dev->irq, (void *) icom_adapter);
1477 iounmap(icom_adapter->base_addr); 1477 iounmap(icom_adapter->base_addr);
1478 icom_free_adapter(icom_adapter); 1478 icom_free_adapter(icom_adapter);
1479 pci_release_regions(icom_adapter->pci_dev); 1479 pci_release_regions(icom_adapter->pci_dev);
@@ -1539,7 +1539,6 @@ static int __devinit icom_probe(struct pci_dev *dev,
1539 } 1539 }
1540 1540
1541 icom_adapter->base_addr_pci = pci_resource_start(dev, 0); 1541 icom_adapter->base_addr_pci = pci_resource_start(dev, 0);
1542 icom_adapter->irq_number = dev->irq;
1543 icom_adapter->pci_dev = dev; 1542 icom_adapter->pci_dev = dev;
1544 icom_adapter->version = ent->driver_data; 1543 icom_adapter->version = ent->driver_data;
1545 icom_adapter->subsystem_id = ent->subdevice; 1544 icom_adapter->subsystem_id = ent->subdevice;
@@ -1570,7 +1569,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
1570 icom_port = &icom_adapter->port_info[index]; 1569 icom_port = &icom_adapter->port_info[index];
1571 1570
1572 if (icom_port->status == ICOM_PORT_ACTIVE) { 1571 if (icom_port->status == ICOM_PORT_ACTIVE) {
1573 icom_port->uart_port.irq = icom_port->adapter->irq_number; 1572 icom_port->uart_port.irq = icom_port->adapter->pci_dev->irq;
1574 icom_port->uart_port.type = PORT_ICOM; 1573 icom_port->uart_port.type = PORT_ICOM;
1575 icom_port->uart_port.iotype = UPIO_MEM; 1574 icom_port->uart_port.iotype = UPIO_MEM;
1576 icom_port->uart_port.membase = 1575 icom_port->uart_port.membase =
diff --git a/drivers/serial/icom.h b/drivers/serial/icom.h
index 798f1ef23712..e8578d8cd35e 100644
--- a/drivers/serial/icom.h
+++ b/drivers/serial/icom.h
@@ -258,7 +258,6 @@ struct icom_port {
258struct icom_adapter { 258struct icom_adapter {
259 void __iomem * base_addr; 259 void __iomem * base_addr;
260 unsigned long base_addr_pci; 260 unsigned long base_addr_pci;
261 unsigned char irq_number;
262 struct pci_dev *pci_dev; 261 struct pci_dev *pci_dev;
263 struct icom_port port_info[4]; 262 struct icom_port port_info[4];
264 int index; 263 int index;
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e4f0dd00ae85..8372ace4a0d9 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -139,7 +139,7 @@ config FB_TILEBLITTING
139 This is particularly important to one driver, matroxfb. If 139 This is particularly important to one driver, matroxfb. If
140 unsure, say N. 140 unsure, say N.
141 141
142comment "Frambuffer hardware drivers" 142comment "Frame buffer hardware drivers"
143 depends on FB 143 depends on FB
144 144
145config FB_CIRRUS 145config FB_CIRRUS