aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-23 18:07:21 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-23 18:07:21 -0500
commit9156ad48338e0306e508ead5c0d9986050744475 (patch)
tree37f3a90e38190052ecf3cdf9171dfdddd37b56fd /drivers/char
parentfa28237cfcc5827553044cbd6ee52e33692b0faa (diff)
parent8f7b3d156d348b6766833cd4e272d0d19b501e64 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/Kconfig2
-rw-r--r--drivers/char/tpm/tpm.c12
-rw-r--r--drivers/char/tty_ioctl.c21
3 files changed, 27 insertions, 8 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index ef1ed5d70125..2e3a0d4bc4c2 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -137,7 +137,7 @@ config CYCLADES
137 your Linux box, for instance in order to become a dial-in server. 137 your Linux box, for instance in order to become a dial-in server.
138 138
139 For information about the Cyclades-Z card, read 139 For information about the Cyclades-Z card, read
140 <file:drivers/char/README.cycladesZ>. 140 <file:Documentation/README.cycladesZ>.
141 141
142 To compile this driver as a module, choose M here: the 142 To compile this driver as a module, choose M here: the
143 module will be called cyclades. 143 module will be called cyclades.
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 39564b76d4a3..c88424a0c89b 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -1046,12 +1046,6 @@ void tpm_remove_hardware(struct device *dev)
1046} 1046}
1047EXPORT_SYMBOL_GPL(tpm_remove_hardware); 1047EXPORT_SYMBOL_GPL(tpm_remove_hardware);
1048 1048
1049static u8 savestate[] = {
1050 0, 193, /* TPM_TAG_RQU_COMMAND */
1051 0, 0, 0, 10, /* blob length (in bytes) */
1052 0, 0, 0, 152 /* TPM_ORD_SaveState */
1053};
1054
1055/* 1049/*
1056 * We are about to suspend. Save the TPM state 1050 * We are about to suspend. Save the TPM state
1057 * so that it can be restored. 1051 * so that it can be restored.
@@ -1059,6 +1053,12 @@ static u8 savestate[] = {
1059int tpm_pm_suspend(struct device *dev, pm_message_t pm_state) 1053int tpm_pm_suspend(struct device *dev, pm_message_t pm_state)
1060{ 1054{
1061 struct tpm_chip *chip = dev_get_drvdata(dev); 1055 struct tpm_chip *chip = dev_get_drvdata(dev);
1056 u8 savestate[] = {
1057 0, 193, /* TPM_TAG_RQU_COMMAND */
1058 0, 0, 0, 10, /* blob length (in bytes) */
1059 0, 0, 0, 152 /* TPM_ORD_SaveState */
1060 };
1061
1062 if (chip == NULL) 1062 if (chip == NULL)
1063 return -ENODEV; 1063 return -ENODEV;
1064 1064
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 1bdd2bf4f37d..d4b6d64e858b 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -62,7 +62,7 @@ void tty_wait_until_sent(struct tty_struct * tty, long timeout)
62 if (!timeout) 62 if (!timeout)
63 timeout = MAX_SCHEDULE_TIMEOUT; 63 timeout = MAX_SCHEDULE_TIMEOUT;
64 if (wait_event_interruptible_timeout(tty->write_wait, 64 if (wait_event_interruptible_timeout(tty->write_wait,
65 !tty->driver->chars_in_buffer(tty), timeout)) 65 !tty->driver->chars_in_buffer(tty), timeout) < 0)
66 return; 66 return;
67 if (tty->driver->wait_until_sent) 67 if (tty->driver->wait_until_sent)
68 tty->driver->wait_until_sent(tty, timeout); 68 tty->driver->wait_until_sent(tty, timeout);
@@ -365,6 +365,25 @@ void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old)
365EXPORT_SYMBOL(tty_termios_copy_hw); 365EXPORT_SYMBOL(tty_termios_copy_hw);
366 366
367/** 367/**
368 * tty_termios_hw_change - check for setting change
369 * @a: termios
370 * @b: termios to compare
371 *
372 * Check if any of the bits that affect a dumb device have changed
373 * between the two termios structures, or a speed change is needed.
374 */
375
376int tty_termios_hw_change(struct ktermios *a, struct ktermios *b)
377{
378 if (a->c_ispeed != b->c_ispeed || a->c_ospeed != b->c_ospeed)
379 return 1;
380 if ((a->c_cflag ^ b->c_cflag) & ~(HUPCL | CREAD | CLOCAL))
381 return 1;
382 return 0;
383}
384EXPORT_SYMBOL(tty_termios_hw_change);
385
386/**
368 * change_termios - update termios values 387 * change_termios - update termios values
369 * @tty: tty to update 388 * @tty: tty to update
370 * @new_termios: desired new value 389 * @new_termios: desired new value