Commit ce2c87d4 authored by Kylene Jo Hall's avatar Kylene Jo Hall Committed by Linus Torvalds

[PATCH] tpm: change from pci_dev to dev power management functions

This patch is in support of moving away from the lpc bus pci_dev.  The power
management prototypes used by platform drivers is different but the
functionality remains the same.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e659a3fe
...@@ -484,9 +484,9 @@ static u8 savestate[] = { ...@@ -484,9 +484,9 @@ static u8 savestate[] = {
* We are about to suspend. Save the TPM state * We are about to suspend. Save the TPM state
* so that it can be restored. * so that it can be restored.
*/ */
int tpm_pm_suspend(struct pci_dev *pci_dev, pm_message_t pm_state) int tpm_pm_suspend(struct device *dev, pm_message_t pm_state)
{ {
struct tpm_chip *chip = pci_get_drvdata(pci_dev); struct tpm_chip *chip = dev_get_drvdata(dev);
if (chip == NULL) if (chip == NULL)
return -ENODEV; return -ENODEV;
...@@ -500,9 +500,9 @@ EXPORT_SYMBOL_GPL(tpm_pm_suspend); ...@@ -500,9 +500,9 @@ EXPORT_SYMBOL_GPL(tpm_pm_suspend);
* Resume from a power safe. The BIOS already restored * Resume from a power safe. The BIOS already restored
* the TPM state. * the TPM state.
*/ */
int tpm_pm_resume(struct pci_dev *pci_dev) int tpm_pm_resume(struct device *dev)
{ {
struct tpm_chip *chip = pci_get_drvdata(pci_dev); struct tpm_chip *chip = dev_get_drvdata(dev);
if (chip == NULL) if (chip == NULL)
return -ENODEV; return -ENODEV;
......
...@@ -100,5 +100,5 @@ extern ssize_t tpm_write(struct file *, const char __user *, size_t, ...@@ -100,5 +100,5 @@ extern ssize_t tpm_write(struct file *, const char __user *, size_t,
loff_t *); loff_t *);
extern ssize_t tpm_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t tpm_read(struct file *, char __user *, size_t, loff_t *);
extern void tpm_remove_hardware(struct device *); extern void tpm_remove_hardware(struct device *);
extern int tpm_pm_suspend(struct pci_dev *, pm_message_t); extern int tpm_pm_suspend(struct device *, pm_message_t);
extern int tpm_pm_resume(struct pci_dev *); extern int tpm_pm_resume(struct device *);
Markdown is supported
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