All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@gentoo.org>
To: Andrew Morton <akpm@osdl.org>
Cc: benh@kernel.crashing.org, linux-kernel@vger.kernel.org,
	linux-pm@osdl.org
Subject: [-mm PATCH] driver model: PM type conversions in drivers/macintosh
Date: Fri, 04 Feb 2005 22:07:41 +0000	[thread overview]
Message-ID: <4203F22D.5070200@gentoo.org> (raw)

[-- 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);
 

                 reply	other threads:[~2005-02-05  1:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4203F22D.5070200@gentoo.org \
    --to=dsd@gentoo.org \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.