Commit ce2c87d4f733b6fcd7b7fb1d5311c870339c9725
Committed by
Linus Torvalds
1 parent
e659a3fe20
Exists in
master
and in
4 other branches
[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: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 2 changed files with 6 additions and 6 deletions Side-by-side Diff
drivers/char/tpm/tpm.c
| ... | ... | @@ -484,9 +484,9 @@ |
| 484 | 484 | * We are about to suspend. Save the TPM state |
| 485 | 485 | * so that it can be restored. |
| 486 | 486 | */ |
| 487 | -int tpm_pm_suspend(struct pci_dev *pci_dev, pm_message_t pm_state) | |
| 487 | +int tpm_pm_suspend(struct device *dev, pm_message_t pm_state) | |
| 488 | 488 | { |
| 489 | - struct tpm_chip *chip = pci_get_drvdata(pci_dev); | |
| 489 | + struct tpm_chip *chip = dev_get_drvdata(dev); | |
| 490 | 490 | if (chip == NULL) |
| 491 | 491 | return -ENODEV; |
| 492 | 492 | |
| 493 | 493 | |
| ... | ... | @@ -500,9 +500,9 @@ |
| 500 | 500 | * Resume from a power safe. The BIOS already restored |
| 501 | 501 | * the TPM state. |
| 502 | 502 | */ |
| 503 | -int tpm_pm_resume(struct pci_dev *pci_dev) | |
| 503 | +int tpm_pm_resume(struct device *dev) | |
| 504 | 504 | { |
| 505 | - struct tpm_chip *chip = pci_get_drvdata(pci_dev); | |
| 505 | + struct tpm_chip *chip = dev_get_drvdata(dev); | |
| 506 | 506 | |
| 507 | 507 | if (chip == NULL) |
| 508 | 508 | return -ENODEV; |
drivers/char/tpm/tpm.h
| ... | ... | @@ -100,6 +100,6 @@ |
| 100 | 100 | loff_t *); |
| 101 | 101 | extern ssize_t tpm_read(struct file *, char __user *, size_t, loff_t *); |
| 102 | 102 | extern void tpm_remove_hardware(struct device *); |
| 103 | -extern int tpm_pm_suspend(struct pci_dev *, pm_message_t); | |
| 104 | -extern int tpm_pm_resume(struct pci_dev *); | |
| 103 | +extern int tpm_pm_suspend(struct device *, pm_message_t); | |
| 104 | +extern int tpm_pm_resume(struct device *); |