diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2013-11-26 15:30:42 -0500 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2014-01-06 08:37:25 -0500 |
commit | 1e3b73a95793555860512008035f6822406a2a79 (patch) | |
tree | dea6555c5b9f7e3267621bfde641e26b6e9d08d6 /drivers/char/tpm/tpm_ibmvtpm.c | |
parent | 000a07b0aac1bc69bcf602b468d975c3e37a155c (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_ibmvtpm.c')
-rw-r--r-- | drivers/char/tpm/tpm_ibmvtpm.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c index 2ee43093066f..ff064f08b48e 100644 --- a/drivers/char/tpm/tpm_ibmvtpm.c +++ b/drivers/char/tpm/tpm_ibmvtpm.c | |||
@@ -403,33 +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 | ||
406 | static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL); | ||
407 | static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL); | ||
408 | static DEVICE_ATTR(enabled, S_IRUGO, tpm_show_enabled, NULL); | ||
409 | static DEVICE_ATTR(active, S_IRUGO, tpm_show_active, NULL); | ||
410 | static DEVICE_ATTR(owned, S_IRUGO, tpm_show_owned, NULL); | ||
411 | static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated, | ||
412 | NULL); | ||
413 | static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); | ||
414 | static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); | ||
415 | static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL); | ||
416 | static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL); | ||
417 | |||
418 | static struct attribute *ibmvtpm_attrs[] = { | ||
419 | &dev_attr_pubek.attr, | ||
420 | &dev_attr_pcrs.attr, | ||
421 | &dev_attr_enabled.attr, | ||
422 | &dev_attr_active.attr, | ||
423 | &dev_attr_owned.attr, | ||
424 | &dev_attr_temp_deactivated.attr, | ||
425 | &dev_attr_caps.attr, | ||
426 | &dev_attr_cancel.attr, | ||
427 | &dev_attr_durations.attr, | ||
428 | &dev_attr_timeouts.attr, NULL, | ||
429 | }; | ||
430 | |||
431 | static struct attribute_group ibmvtpm_attr_grp = { .attrs = ibmvtpm_attrs }; | ||
432 | |||
433 | static const struct tpm_vendor_specific tpm_ibmvtpm = { | 406 | static const struct tpm_vendor_specific tpm_ibmvtpm = { |
434 | .recv = tpm_ibmvtpm_recv, | 407 | .recv = tpm_ibmvtpm_recv, |
435 | .send = tpm_ibmvtpm_send, | 408 | .send = tpm_ibmvtpm_send, |
@@ -438,7 +411,6 @@ static const struct tpm_vendor_specific tpm_ibmvtpm = { | |||
438 | .req_complete_mask = 0, | 411 | .req_complete_mask = 0, |
439 | .req_complete_val = 0, | 412 | .req_complete_val = 0, |
440 | .req_canceled = tpm_ibmvtpm_req_canceled, | 413 | .req_canceled = tpm_ibmvtpm_req_canceled, |
441 | .attr_group = &ibmvtpm_attr_grp, | ||
442 | }; | 414 | }; |
443 | 415 | ||
444 | static const struct dev_pm_ops tpm_ibmvtpm_pm_ops = { | 416 | static const struct dev_pm_ops tpm_ibmvtpm_pm_ops = { |