public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [-mm PATCH] driver model: PM type conversions in drivers/macintosh
@ 2005-02-04 22:07 Daniel Drake
  0 siblings, 0 replies; only message in thread
From: Daniel Drake @ 2005-02-04 22:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: benh, linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 133 bytes --]

This fixes PM driver model type checking for drivers/macintosh.
Acked by Pavel Machek.

Signed-off-by: Daniel Drake <dsd@gentoo.org>

[-- Attachment #2: macintosh-pm-type-safety.patch --]
[-- Type: text/x-patch, Size: 2248 bytes --]

diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/macintosh/macio_asic.c linux-dsd/drivers/macintosh/macio_asic.c
--- linux-2.6.11-rc2-mm2/drivers/macintosh/macio_asic.c	2004-12-24 21:34:31.000000000 +0000
+++ linux-dsd/drivers/macintosh/macio_asic.c	2005-02-02 21:30:44.000000000 +0000
@@ -106,7 +106,7 @@ static void macio_device_shutdown(struct
 		drv->shutdown(macio_dev);
 }
 
-static int macio_device_suspend(struct device *dev, u32 state)
+static int macio_device_suspend(struct device *dev, pm_message_t state)
 {
 	struct macio_dev * macio_dev = to_macio_device(dev);
 	struct macio_driver * drv = to_macio_driver(dev->driver);
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/macintosh/mediabay.c linux-dsd/drivers/macintosh/mediabay.c
--- linux-2.6.11-rc2-mm2/drivers/macintosh/mediabay.c	2004-12-24 21:34:26.000000000 +0000
+++ linux-dsd/drivers/macintosh/mediabay.c	2005-02-02 21:56:29.000000000 +0000
@@ -710,7 +710,7 @@ static int __devinit media_bay_attach(st
 
 }
 
-static int __pmac media_bay_suspend(struct macio_dev *mdev, u32 state)
+static int __pmac media_bay_suspend(struct macio_dev *mdev, pm_message_t state)
 {
 	struct media_bay_info	*bay = macio_get_drvdata(mdev);
 
@@ -729,8 +729,8 @@ static int __pmac media_bay_resume(struc
 {
 	struct media_bay_info	*bay = macio_get_drvdata(mdev);
 
-	if (mdev->ofdev.dev.power.power_state != 0) {
-		mdev->ofdev.dev.power.power_state = 0;
+	if (mdev->ofdev.dev.power.power_state != PMSG_ON) {
+		mdev->ofdev.dev.power.power_state = PMSG_ON;
 
 	       	/* We re-enable the bay using it's previous content
 	       	   only if it did not change. Note those bozo timings,
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/include/asm-ppc/macio.h linux-dsd/include/asm-ppc/macio.h
--- linux-2.6.11-rc2-mm2/include/asm-ppc/macio.h	2004-12-24 21:34:01.000000000 +0000
+++ linux-dsd/include/asm-ppc/macio.h	2005-02-02 21:34:30.000000000 +0000
@@ -126,7 +126,7 @@ struct macio_driver
 	int	(*probe)(struct macio_dev* dev, const struct of_match *match);
 	int	(*remove)(struct macio_dev* dev);
 
-	int	(*suspend)(struct macio_dev* dev, u32 state);
+	int	(*suspend)(struct macio_dev* dev, pm_message_t state);
 	int	(*resume)(struct macio_dev* dev);
 	int	(*shutdown)(struct macio_dev* dev);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-05  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-04 22:07 [-mm PATCH] driver model: PM type conversions in drivers/macintosh Daniel Drake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox