[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87d41xu18p.fsf@devron.myhome.or.jp>
Date: Wed, 30 Dec 2009 02:41:10 +0900
From: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To: Andrew Morton <akpm@...ux-foundation.org>,
Debora Velarde <debora@...ux.vnet.ibm.com>,
Rajiv Andrade <srajiv@...ux.vnet.ibm.com>,
Marcel Selhorst <m.selhorst@...rix.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] tpm_infineon: Fix suspend/resume handler for pnp_driver
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@...l.parknet.co.jp>
---
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@...l.parknet.co.jp>
--
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