[PATCH] tpm: sysfs owernship changes
[deliverable/linux.git] / drivers / char / tpm / tpm_atmel.c
index 3271391892e87bcca2117c2de1d201a98604bffe..07abfb7143b105350d3ebaa353867ce17836a7a7 100644 (file)
@@ -126,6 +126,21 @@ static struct file_operations atmel_ops = {
        .release = tpm_release,
 };
 
+static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL);
+static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL);
+static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL);
+static DEVICE_ATTR(cancel, S_IWUSR |S_IWGRP, NULL, tpm_store_cancel);
+
+static struct attribute* atmel_attrs[] = {
+       &dev_attr_pubek.attr,
+       &dev_attr_pcrs.attr,
+       &dev_attr_caps.attr,
+       &dev_attr_cancel.attr,
+       0,
+};
+
+static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs };
+
 static struct tpm_vendor_specific tpm_atmel = {
        .recv = tpm_atml_recv,
        .send = tpm_atml_send,
@@ -133,6 +148,7 @@ static struct tpm_vendor_specific tpm_atmel = {
        .req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL,
        .req_complete_val = ATML_STATUS_DATA_AVAIL,
        .base = TPM_ATML_BASE,
+       .attr_group = &atmel_attr_grp,
        .miscdev = { .fops = &atmel_ops, },
 };
 
This page took 0.036466 seconds and 5 git commands to generate.