summaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
authorGang Wei <gang.wei@intel.com>2012-10-09 09:35:22 (GMT)
committerKent Yoder <key@linux.vnet.ibm.com>2012-10-10 14:50:56 (GMT)
commit1631cfb7cee28388b04aef6c0a73050f6fd76e4d (patch)
treec3c5d069dedb5c1084a18ddb3be06c6e9a6aa9de /drivers/char/tpm/tpm.h
parentecefbd94b834fa32559d854646d777c56749ef1c (diff)
downloadlinux-1631cfb7cee28388b04aef6c0a73050f6fd76e4d.tar.xz
driver/char/tpm: fix regression causesd by ppi
This patch try to fix the S3 regression https://lkml.org/lkml/2012/10/5/433, which includes below line: [ 1554.684638] sysfs: cannot create duplicate filename '/devices/pnp0/00:0c/ppi' The root cause is that ppi sysfs teardown code is MIA, so while S3 resume, the ppi kobject will be created again upon existing one. To make the tear down code simple, change the ppi subfolder creation from using kobject_create_and_add to just using a named ppi attribute_group. Then ppi sysfs teardown could be done with a simple sysfs_remove_group call. Adjusted the name & return type for ppi sysfs init function. Reported-by: Ben Guthro <ben@guthro.net> Signed-off-by: Gang Wei <gang.wei@intel.com> Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r--drivers/char/tpm/tpm.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 02c266a..8ef7649 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -329,10 +329,15 @@ extern int wait_for_tpm_stat(struct tpm_chip *, u8, unsigned long,
wait_queue_head_t *);
#ifdef CONFIG_ACPI
-extern ssize_t sys_add_ppi(struct kobject *parent);
+extern int tpm_add_ppi(struct kobject *);
+extern void tpm_remove_ppi(struct kobject *);
#else
-static inline ssize_t sys_add_ppi(struct kobject *parent)
+static inline int tpm_add_ppi(struct kobject *parent)
{
return 0;
}
+
+static inline void tpm_remove_ppi(struct kobject *parent)
+{
+}
#endif