lkml.org 
[lkml]   [2005]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateFri, 04 Feb 2005 22:07:41 +0000
FromDaniel Drake <>
Subject[-mm PATCH] driver model: PM type conversions in drivers/macintosh
This fixes PM driver model type checking for drivers/macintosh.
Acked by Pavel Machek.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
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);
\
 
 \ /
  Last update: 2005-03-22 14:10    [from the cache]
©2003-2010