aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_nsc.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2013-11-26 15:30:42 -0500
committerPeter Huewe <peterhuewe@gmx.de>2014-01-06 08:37:25 -0500
commit1e3b73a95793555860512008035f6822406a2a79 (patch)
treedea6555c5b9f7e3267621bfde641e26b6e9d08d6 /drivers/char/tpm/tpm_nsc.c
parent000a07b0aac1bc69bcf602b468d975c3e37a155c (diff)
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>
Diffstat (limited to 'drivers/char/tpm/tpm_nsc.c')
-rw-r--r--drivers/char/tpm/tpm_nsc.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c
index a4acac9008f7..ad980be553dc 100644
--- a/drivers/char/tpm/tpm_nsc.c
+++ b/drivers/char/tpm/tpm_nsc.c
@@ -232,21 +232,6 @@ static bool tpm_nsc_req_canceled(struct tpm_chip *chip, u8 status)
232 return (status == NSC_STATUS_RDY); 232 return (status == NSC_STATUS_RDY);
233} 233}
234 234
235static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL);
236static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL);
237static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL);
238static DEVICE_ATTR(cancel, S_IWUSR|S_IWGRP, NULL, tpm_store_cancel);
239
240static struct attribute * nsc_attrs[] = {
241 &dev_attr_pubek.attr,
242 &dev_attr_pcrs.attr,
243 &dev_attr_caps.attr,
244 &dev_attr_cancel.attr,
245 NULL,
246};
247
248static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs };
249
250static const struct tpm_vendor_specific tpm_nsc = { 235static const struct tpm_vendor_specific tpm_nsc = {
251 .recv = tpm_nsc_recv, 236 .recv = tpm_nsc_recv,
252 .send = tpm_nsc_send, 237 .send = tpm_nsc_send,
@@ -255,7 +240,6 @@ static const struct tpm_vendor_specific tpm_nsc = {
255 .req_complete_mask = NSC_STATUS_OBF, 240 .req_complete_mask = NSC_STATUS_OBF,
256 .req_complete_val = NSC_STATUS_OBF, 241 .req_complete_val = NSC_STATUS_OBF,
257 .req_canceled = tpm_nsc_req_canceled, 242 .req_canceled = tpm_nsc_req_canceled,
258 .attr_group = &nsc_attr_grp,
259}; 243};
260 244
261static struct platform_device *pdev = NULL; 245static struct platform_device *pdev = NULL;