Re: [PATCH] driver/char/tpm: fix regression causesd by ppi

2012-10-10 Thread Kent Yoder
> > Hmm, tpm_add_ppi is just sysfs_create_group, which only ever returns > > 0. Looks like we can remove this error path, but PPI is unusable in the > > failure case. > > sysfs_create_group will return 0 on success or return error code. So I don't > think we can remove this error path. The

Re: [PATCH] driver/char/tpm: fix regression causesd by ppi

2012-10-10 Thread Kent Yoder
Hmm, tpm_add_ppi is just sysfs_create_group, which only ever returns 0. Looks like we can remove this error path, but PPI is unusable in the failure case. sysfs_create_group will return 0 on success or return error code. So I don't think we can remove this error path. The previous call

RE: [PATCH] driver/char/tpm: fix regression causesd by ppi

2012-10-09 Thread Wei, Gang
Kent Yoder wrote on 2012-10-10: > On Tue, Oct 09, 2012 at 05:35:22PM +0800, gang@intel.com wrote: >> @@ -1476,7 +1477,7 @@ struct tpm_chip *tpm_register_hardware(struct > device *dev, >> goto put_device; >> } >> -if (sys_add_ppi(>kobj)) { >> +if (tpm_add_ppi(>kobj)) {

Re: [PATCH] driver/char/tpm: fix regression causesd by ppi

2012-10-09 Thread Kent Yoder
Hi Jimmy, On Tue, Oct 09, 2012 at 05:35:22PM +0800, gang@intel.com wrote: > From: Gang Wei > > 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' > >

Re: [PATCH] driver/char/tpm: fix regression causesd by ppi

2012-10-09 Thread Kent Yoder
Hi Jimmy, On Tue, Oct 09, 2012 at 05:35:22PM +0800, gang@intel.com wrote: From: Gang Wei gang@intel.com 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

RE: [PATCH] driver/char/tpm: fix regression causesd by ppi

2012-10-09 Thread Wei, Gang
Kent Yoder wrote on 2012-10-10: On Tue, Oct 09, 2012 at 05:35:22PM +0800, gang@intel.com wrote: @@ -1476,7 +1477,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, goto put_device; } -if (sys_add_ppi(dev-kobj)) { +if (tpm_add_ppi(dev-kobj)) {