tpm: Pull all driver sysfs code into tpm-sysfs.c
The tpm core now sets up and controls all sysfs attributes, instead of having each driver have a unique take on it. All drivers now now have a uniform set of attributes, and no sysfs related entry points are exported from the tpm core module. This also uses the new method used to declare sysfs attributes with DEVICE_ATTR_RO and 'struct attribute *' Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> [phuewe: had to apply the tpm_i2c_atmel part manually due to commit 191ffc6bde3fc tpm/tpm_i2c_atmel: fix coccinelle warnings] Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
This commit is contained in:

committed by
Peter Huewe

parent
000a07b0aa
commit
1e3b73a957
@@ -121,21 +121,6 @@ static bool tpm_atml_req_canceled(struct tpm_chip *chip, u8 status)
|
||||
return (status == ATML_STATUS_READY);
|
||||
}
|
||||
|
||||
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,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs };
|
||||
|
||||
static const struct tpm_vendor_specific tpm_atmel = {
|
||||
.recv = tpm_atml_recv,
|
||||
.send = tpm_atml_send,
|
||||
@@ -144,7 +129,6 @@ static const struct tpm_vendor_specific tpm_atmel = {
|
||||
.req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL,
|
||||
.req_complete_val = ATML_STATUS_DATA_AVAIL,
|
||||
.req_canceled = tpm_atml_req_canceled,
|
||||
.attr_group = &atmel_attr_grp,
|
||||
};
|
||||
|
||||
static struct platform_device *pdev;
|
||||
|
Reference in New Issue
Block a user