lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <B8EFE96D1287C24090BAD9D858E15E61738933@sisaex02sj>
Date:	Wed, 10 Jul 2013 23:02:45 +0000
From:	Shuah Khan <shuah.kh@...sung.com>
To:	Peter Hüwe <PeterHuewe@....de>
Cc:	"tpmdd-devel@...ts.sourceforge.net" 
	<tpmdd-devel@...ts.sourceforge.net>,
	"rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
	"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
	"a.zummo@...ertech.it" <a.zummo@...ertech.it>,
	"key@...ux.vnet.ibm.com" <key@...ux.vnet.ibm.com>,
	"mail@...jiv.net" <mail@...jiv.net>,
	"tpmdd@...horst.net" <tpmdd@...horst.net>,
	"tpmdd@...rix.com" <tpmdd@...rix.com>,
	"matthew.garrett@...ula.com" <matthew.garrett@...ula.com>,
	"rtc-linux@...glegroups.com" <rtc-linux@...glegroups.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"platform-driver-x86@...r.kernel.org" 
	<platform-driver-x86@...r.kernel.org>,
	"shuahkhan@...il.com" <shuahkhan@...il.com>,
	Shuah Khan <shuah.kh@...sung.com>
Subject: Re: [tpmdd-devel] [PATCH 3/4] tpm: Convert tpm_tis driver to use
 dev_pm_ops from legacy pm_ops

On 07/10/2013 04:43 PM, Peter Hüwe wrote:
> Hi,
>
> thanks for your patch
>>   static struct pnp_device_id tpm_pnp_tbl[] = {
>>   	{"PNP0C31", 0},		/* TPM */
>>   	{"ATM1200", 0},		/* Atmel */
>> @@ -835,9 +834,12 @@ static struct pnp_driver tis_pnp_driver = {
>>   	.name = "tpm_tis",
>>   	.id_table = tpm_pnp_tbl,
>>   	.probe = tpm_tis_pnp_init,
>> -	.suspend = tpm_tis_pnp_suspend,
>> -	.resume = tpm_tis_pnp_resume,
>>   	.remove = tpm_tis_pnp_remove,
>> +#ifdef CONFIG_PM_SLEEP
>> +	.driver	= {
>> +		.pm = &tpm_tis_pm,
>> +	},
>> +#endif
>>   };
>
>
> I don't think the #if CONFIG_PM_SLEEP is required here.
>
> Thanks,
> Peter
>

tpm_tis_resume() is defined originally in CONFIG_PM_SLEEP scope. I can 
make the change to have tpm_tis_resume() not be in CONFIG_PM_SLEEP scope 
and remove this CONFIG_PM_SLEEP when defining .pm. That does make sense 
looking at tpm_pm_suspend() and tpm_pm_resume() which are defined 
without CONFIG_PM_SLEEP scope. Sounds like the right approach? I will 
redo the patch and send v2.

I find that the use of CONFIG_PM, CONFIG_PM_SLEEP, and CONFIG_PM_RUNTIME 
are not very consistent. :)

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@...sung.com | (970) 672-0658
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ