[PATCH] tpm_infineon: Fix suspend/resume handler for pnp_driver

From: OGAWA Hirofumi
Date: Tue Dec 29 2009 - 12:41:19 EST


Hi,

With recent quick review, I found the bug of tpm_infineon. (I don't have
this device, and compile test only)


PNP driver must use pnp_driver->suspend/resume anymore.

Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
---

drivers/char/tpm/tpm_infineon.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)

diff -puN drivers/char/tpm/tpm_infineon.c~tpm-pnp_driver-convert drivers/char/tpm/tpm_infineon.c
--- linux-2.6/drivers/char/tpm/tpm_infineon.c~tpm-pnp_driver-convert 2009-12-30 02:27:07.000000000 +0900
+++ linux-2.6-hirofumi/drivers/char/tpm/tpm_infineon.c 2009-12-30 02:27:07.000000000 +0900
@@ -611,16 +611,26 @@ static __devexit void tpm_inf_pnp_remove
}
}

+static int tpm_pnp_suspend(struct pnp_dev *dev, pm_message_t pm_state)
+{
+ return tpm_pm_suspend(&dev->dev, pm_state);
+}
+
+static int tpm_pnp_resume(struct pnp_dev *dev)
+{
+ return tpm_pm_resume(&dev->dev);
+}
+
static struct pnp_driver tpm_inf_pnp_driver = {
.name = "tpm_inf_pnp",
- .driver = {
- .owner = THIS_MODULE,
- .suspend = tpm_pm_suspend,
- .resume = tpm_pm_resume,
- },
.id_table = tpm_pnp_tbl,
.probe = tpm_inf_pnp_probe,
.remove = __devexit_p(tpm_inf_pnp_remove),
+ .suspend = tpm_pnp_suspend,
+ .resume = tpm_pnp_resume,
+ .driver = {
+ .owner = THIS_MODULE,
+ },
};

static int __init init_inf(void)
_

--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/