diff options
author | Kylene Jo Hall <kjhall@us.ibm.com> | 2005-11-14 01:07:42 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-14 03:14:17 +0100 |
commit | f6a2382cec3ed9b67b01febfa85d7d72b254844a (patch) | |
tree | a15ab118ad15a6392c7b41cb56094e9f938d25fc /drivers/char/tpm | |
parent | [PATCH] tpm: updates for new hardware (diff) | |
download | linux-f6a2382cec3ed9b67b01febfa85d7d72b254844a.tar.xz linux-f6a2382cec3ed9b67b01febfa85d7d72b254844a.zip |
[PATCH] tpm: dev_mask handling fix
- Use ~, not !
- Remove unneeded cast
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/tpm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 303f15880466..1a53da99b58f 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -428,8 +428,7 @@ ssize_t tpm_read(struct file * file, char __user *buf, ret_size = size; down(&chip->buffer_mutex); - if (copy_to_user - ((void __user *) buf, chip->data_buffer, ret_size)) + if (copy_to_user(buf, chip->data_buffer, ret_size)) ret_size = -EFAULT; up(&chip->buffer_mutex); } @@ -460,7 +459,7 @@ void tpm_remove_hardware(struct device *dev) sysfs_remove_group(&dev->kobj, chip->vendor->attr_group); dev_mask[chip->dev_num / TPM_NUM_MASK_ENTRIES ] &= - !(1 << (chip->dev_num % TPM_NUM_MASK_ENTRIES)); + ~(1 << (chip->dev_num % TPM_NUM_MASK_ENTRIES)); kfree(chip); |