Skip to content
Commit 1631cfb7 authored by Gang Wei's avatar Gang Wei Committed by Kent Yoder
Browse files

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: default avatarBen Guthro <ben@guthro.net>
Signed-off-by: default avatarGang Wei <gang.wei@intel.com>
Signed-off-by: default avatarKent Yoder <key@linux.vnet.ibm.com>
parent ecefbd94
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment