aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/Kconfig2
-rw-r--r--drivers/char/cs5535_gpio.c5
-rw-r--r--drivers/char/sonypi.c8
-rw-r--r--drivers/char/tpm/tpm_tis.c10
4 files changed, 16 insertions, 9 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index bf18d757b876..a509b8d79781 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -457,7 +457,7 @@ config LEGACY_PTYS
457config LEGACY_PTY_COUNT 457config LEGACY_PTY_COUNT
458 int "Maximum number of legacy PTY in use" 458 int "Maximum number of legacy PTY in use"
459 depends on LEGACY_PTYS 459 depends on LEGACY_PTYS
460 range 1 256 460 range 0 256
461 default "256" 461 default "256"
462 ---help--- 462 ---help---
463 The maximum number of legacy PTYs that can be used at any one time. 463 The maximum number of legacy PTYs that can be used at any one time.
diff --git a/drivers/char/cs5535_gpio.c b/drivers/char/cs5535_gpio.c
index fe6d2407baed..c2d23cae9515 100644
--- a/drivers/char/cs5535_gpio.c
+++ b/drivers/char/cs5535_gpio.c
@@ -104,6 +104,11 @@ static ssize_t cs5535_gpio_write(struct file *file, const char __user *data,
104 for (j = 0; j < ARRAY_SIZE(rm); j++) { 104 for (j = 0; j < ARRAY_SIZE(rm); j++) {
105 if (c == rm[j].on) { 105 if (c == rm[j].on) {
106 outl(m1, base + rm[j].wr_offset); 106 outl(m1, base + rm[j].wr_offset);
107 /* If enabling output, turn off AUX 1 and AUX 2 */
108 if (c == 'O') {
109 outl(m0, base + 0x10);
110 outl(m0, base + 0x14);
111 }
107 break; 112 break;
108 } else if (c == rm[j].off) { 113 } else if (c == rm[j].off) {
109 outl(m0, base + rm[j].wr_offset); 114 outl(m0, base + rm[j].wr_offset);
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 877e53dcb996..921c6d2bc8fc 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_driver = {
1163}; 1163};
1164#endif 1164#endif
1165 1165
1166static int __devinit sonypi_create_input_devices(void) 1166static int __devinit sonypi_create_input_devices(struct platform_device *pdev)
1167{ 1167{
1168 struct input_dev *jog_dev; 1168 struct input_dev *jog_dev;
1169 struct input_dev *key_dev; 1169 struct input_dev *key_dev;
@@ -1177,6 +1177,7 @@ static int __devinit sonypi_create_input_devices(void)
1177 jog_dev->name = "Sony Vaio Jogdial"; 1177 jog_dev->name = "Sony Vaio Jogdial";
1178 jog_dev->id.bustype = BUS_ISA; 1178 jog_dev->id.bustype = BUS_ISA;
1179 jog_dev->id.vendor = PCI_VENDOR_ID_SONY; 1179 jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
1180 jog_dev->dev.parent = &pdev->dev;
1180 1181
1181 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); 1182 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
1182 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); 1183 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE);
@@ -1191,6 +1192,7 @@ static int __devinit sonypi_create_input_devices(void)
1191 key_dev->name = "Sony Vaio Keys"; 1192 key_dev->name = "Sony Vaio Keys";
1192 key_dev->id.bustype = BUS_ISA; 1193 key_dev->id.bustype = BUS_ISA;
1193 key_dev->id.vendor = PCI_VENDOR_ID_SONY; 1194 key_dev->id.vendor = PCI_VENDOR_ID_SONY;
1195 key_dev->dev.parent = &pdev->dev;
1194 1196
1195 /* Initialize the Input Drivers: special keys */ 1197 /* Initialize the Input Drivers: special keys */
1196 key_dev->evbit[0] = BIT_MASK(EV_KEY); 1198 key_dev->evbit[0] = BIT_MASK(EV_KEY);
@@ -1385,7 +1387,7 @@ static int __devinit sonypi_probe(struct platform_device *dev)
1385 1387
1386 if (useinput) { 1388 if (useinput) {
1387 1389
1388 error = sonypi_create_input_devices(); 1390 error = sonypi_create_input_devices(dev);
1389 if (error) { 1391 if (error) {
1390 printk(KERN_ERR 1392 printk(KERN_ERR
1391 "sonypi: failed to create input devices\n"); 1393 "sonypi: failed to create input devices\n");
@@ -1432,7 +1434,7 @@ static int __devexit sonypi_remove(struct platform_device *dev)
1432{ 1434{
1433 sonypi_disable(); 1435 sonypi_disable();
1434 1436
1435 synchronize_sched(); /* Allow sonypi interrupt to complete. */ 1437 synchronize_irq(sonypi_device.irq);
1436 flush_scheduled_work(); 1438 flush_scheduled_work();
1437 1439
1438 if (useinput) { 1440 if (useinput) {
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index fd771a4d6d18..81503d94fecc 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -450,6 +450,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
450 goto out_err; 450 goto out_err;
451 } 451 }
452 452
453 if (request_locality(chip, 0) != 0) {
454 rc = -ENODEV;
455 goto out_err;
456 }
457
453 vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); 458 vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));
454 459
455 /* Default timeouts */ 460 /* Default timeouts */
@@ -487,11 +492,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
487 if (intfcaps & TPM_INTF_DATA_AVAIL_INT) 492 if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
488 dev_dbg(dev, "\tData Avail Int Support\n"); 493 dev_dbg(dev, "\tData Avail Int Support\n");
489 494
490 if (request_locality(chip, 0) != 0) {
491 rc = -ENODEV;
492 goto out_err;
493 }
494
495 /* INTERRUPT Setup */ 495 /* INTERRUPT Setup */
496 init_waitqueue_head(&chip->vendor.read_queue); 496 init_waitqueue_head(&chip->vendor.read_queue);
497 init_waitqueue_head(&chip->vendor.int_queue); 497 init_waitqueue_head(&chip->vendor.int_queue);