diff options
Diffstat (limited to 'drivers/char/tpm/tpm_nsc.c')
-rw-r--r-- | drivers/char/tpm/tpm_nsc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c index 24832abe0b2d..675290169508 100644 --- a/drivers/char/tpm/tpm_nsc.c +++ b/drivers/char/tpm/tpm_nsc.c | |||
@@ -224,6 +224,21 @@ static struct file_operations nsc_ops = { | |||
224 | .release = tpm_release, | 224 | .release = tpm_release, |
225 | }; | 225 | }; |
226 | 226 | ||
227 | static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL); | ||
228 | static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL); | ||
229 | static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); | ||
230 | static DEVICE_ATTR(cancel, S_IWUSR|S_IWGRP, NULL, tpm_store_cancel); | ||
231 | |||
232 | static struct attribute * nsc_attrs[] = { | ||
233 | &dev_attr_pubek.attr, | ||
234 | &dev_attr_pcrs.attr, | ||
235 | &dev_attr_caps.attr, | ||
236 | &dev_attr_cancel.attr, | ||
237 | 0, | ||
238 | }; | ||
239 | |||
240 | static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs }; | ||
241 | |||
227 | static struct tpm_vendor_specific tpm_nsc = { | 242 | static struct tpm_vendor_specific tpm_nsc = { |
228 | .recv = tpm_nsc_recv, | 243 | .recv = tpm_nsc_recv, |
229 | .send = tpm_nsc_send, | 244 | .send = tpm_nsc_send, |
@@ -231,8 +246,8 @@ static struct tpm_vendor_specific tpm_nsc = { | |||
231 | .req_complete_mask = NSC_STATUS_OBF, | 246 | .req_complete_mask = NSC_STATUS_OBF, |
232 | .req_complete_val = NSC_STATUS_OBF, | 247 | .req_complete_val = NSC_STATUS_OBF, |
233 | .base = TPM_NSC_BASE, | 248 | .base = TPM_NSC_BASE, |
249 | .attr_group = &nsc_attr_grp, | ||
234 | .miscdev = { .fops = &nsc_ops, }, | 250 | .miscdev = { .fops = &nsc_ops, }, |
235 | |||
236 | }; | 251 | }; |
237 | 252 | ||
238 | static int __devinit tpm_nsc_init(struct pci_dev *pci_dev, | 253 | static int __devinit tpm_nsc_init(struct pci_dev *pci_dev, |