driver model: PM type conversions in drivers/macintosh
PATCH 1/1 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 <[email protected]>
drivers/macintosh/macio_asic.c +1 -1
@@ -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);
drivers/macintosh/mediabay.c +3 -3
@@ -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,
include/asm-ppc/macio.h +1 -1
@@ -126,7 +126,7 @@ struct macio_driverint (*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);