aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_ibmvtpm.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2013-11-26 15:30:40 -0500
committerPeter Huewe <peterhuewe@gmx.de>2014-01-06 08:37:24 -0500
commitafdba32e2a9ea729a9f9f280dbf6c718773c7ded (patch)
treed77cca8a096e5320f3194d4a6ca1b4fef2dc9b99 /drivers/char/tpm/tpm_ibmvtpm.c
parentd65e55d4999b394e37ffe12543ecd2a17b7c44fc (diff)
tpm: Pull everything related to /dev/tpmX into tpm-dev.c
CLASS-dev.c is a common idiom for Linux subsystems This pulls all the code related to the miscdev into tpm-dev.c and makes it static. The identical file_operation structs in the drivers are purged and the tpm common code unconditionally creates the miscdev. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com> Reviewed-by: Ashley Lai <adlai@linux.vnet.ibm.com> [phuewe: tpm_dev_release is now used only in this file, thus the EXPORT_SYMBOL can be dropped and the function be marked as static. It has no other in-kernel users] Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char/tpm/tpm_ibmvtpm.c')
-rw-r--r--drivers/char/tpm/tpm_ibmvtpm.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c
index cab8d098095c..2ee43093066f 100644
--- a/drivers/char/tpm/tpm_ibmvtpm.c
+++ b/drivers/char/tpm/tpm_ibmvtpm.c
@@ -403,15 +403,6 @@ static bool tpm_ibmvtpm_req_canceled(struct tpm_chip *chip, u8 status)
403 return (status == 0); 403 return (status == 0);
404} 404}
405 405
406static const struct file_operations ibmvtpm_ops = {
407 .owner = THIS_MODULE,
408 .llseek = no_llseek,
409 .open = tpm_open,
410 .read = tpm_read,
411 .write = tpm_write,
412 .release = tpm_release,
413};
414
415static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL); 406static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL);
416static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL); 407static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL);
417static DEVICE_ATTR(enabled, S_IRUGO, tpm_show_enabled, NULL); 408static DEVICE_ATTR(enabled, S_IRUGO, tpm_show_enabled, NULL);
@@ -448,7 +439,6 @@ static const struct tpm_vendor_specific tpm_ibmvtpm = {
448 .req_complete_val = 0, 439 .req_complete_val = 0,
449 .req_canceled = tpm_ibmvtpm_req_canceled, 440 .req_canceled = tpm_ibmvtpm_req_canceled,
450 .attr_group = &ibmvtpm_attr_grp, 441 .attr_group = &ibmvtpm_attr_grp,
451 .miscdev = { .fops = &ibmvtpm_ops, },
452}; 442};
453 443
454static const struct dev_pm_ops tpm_ibmvtpm_pm_ops = { 444static const struct dev_pm_ops tpm_ibmvtpm_pm_ops = {