
From: Pavel Machek <pavel@suse.cz>

This should fix u32 vs pm_message_t confusion in framebuffers, and do no code
changes.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/video/aty/aty128fb.c   |    6 +++---
 25-akpm/drivers/video/aty/atyfb_base.c |    4 ++--
 25-akpm/drivers/video/aty/radeon_pm.c  |    2 +-
 25-akpm/drivers/video/aty/radeonfb.h   |    2 +-
 25-akpm/drivers/video/cyber2000fb.c    |    2 +-
 25-akpm/drivers/video/i810/i810_main.c |    2 +-
 25-akpm/drivers/video/i810/i810_main.h |    2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff -puN drivers/video/aty/aty128fb.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers drivers/video/aty/aty128fb.c
--- 25/drivers/video/aty/aty128fb.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers	Thu Feb 17 16:40:08 2005
+++ 25-akpm/drivers/video/aty/aty128fb.c	Thu Feb 17 16:40:08 2005
@@ -166,7 +166,7 @@ static const char *r128_family[] __devin
 static int aty128_probe(struct pci_dev *pdev,
                                const struct pci_device_id *ent);
 static void aty128_remove(struct pci_dev *pdev);
-static int aty128_pci_suspend(struct pci_dev *pdev, u32 state);
+static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state);
 static int aty128_pci_resume(struct pci_dev *pdev);
 static int aty128_do_resume(struct pci_dev *pdev);
 
@@ -2330,7 +2330,7 @@ static void aty128_set_suspend(struct at
 	}
 }
 
-static int aty128_pci_suspend(struct pci_dev *pdev, u32 state)
+static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	struct fb_info *info = pci_get_drvdata(pdev);
 	struct aty128fb_par *par = info->par;
@@ -2413,7 +2413,7 @@ static int aty128_do_resume(struct pci_d
 	par->lock_blank = 0;
 	aty128fb_blank(0, info);
 
-	pdev->dev.power.power_state = 0;
+	pdev->dev.power.power_state = PMSG_ON;
 
 	printk(KERN_DEBUG "aty128fb: resumed !\n");
 
diff -puN drivers/video/aty/atyfb_base.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers drivers/video/aty/atyfb_base.c
--- 25/drivers/video/aty/atyfb_base.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers	Thu Feb 17 16:40:08 2005
+++ 25-akpm/drivers/video/aty/atyfb_base.c	Thu Feb 17 16:40:08 2005
@@ -2016,7 +2016,7 @@ static int aty_power_mgmt(int sleep, str
 	return timeout ? 0 : -EIO;
 }
 
-static int atyfb_pci_suspend(struct pci_dev *pdev, u32 state)
+static int atyfb_pci_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	struct fb_info *info = pci_get_drvdata(pdev);
 	struct atyfb_par *par = (struct atyfb_par *) info->par;
@@ -2091,7 +2091,7 @@ static int atyfb_pci_resume(struct pci_d
 
 	release_console_sem();
 
-	pdev->dev.power.power_state = 0;
+	pdev->dev.power.power_state = PMSG_ON;
 
 	return 0;
 }
diff -puN drivers/video/aty/radeonfb.h~fix-u32-vs-pm_message_t-confusion-in-framebuffers drivers/video/aty/radeonfb.h
--- 25/drivers/video/aty/radeonfb.h~fix-u32-vs-pm_message_t-confusion-in-framebuffers	Thu Feb 17 16:40:08 2005
+++ 25-akpm/drivers/video/aty/radeonfb.h	Thu Feb 17 16:40:08 2005
@@ -624,7 +624,7 @@ extern void radeon_delete_i2c_busses(str
 extern int radeon_probe_i2c_connector(struct radeonfb_info *rinfo, int conn, u8 **out_edid);
 
 /* PM Functions */
-extern int radeonfb_pci_suspend(struct pci_dev *pdev, u32 state);
+extern int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state);
 extern int radeonfb_pci_resume(struct pci_dev *pdev);
 extern void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk);
 extern void radeonfb_pm_exit(struct radeonfb_info *rinfo);
diff -puN drivers/video/aty/radeon_pm.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers drivers/video/aty/radeon_pm.c
--- 25/drivers/video/aty/radeon_pm.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers	Thu Feb 17 16:40:08 2005
+++ 25-akpm/drivers/video/aty/radeon_pm.c	Thu Feb 17 16:40:08 2005
@@ -2663,7 +2663,7 @@ int radeonfb_pci_resume(struct pci_dev *
 	else if (rinfo->dynclk == 0)
 		radeon_pm_disable_dynamic_mode(rinfo);
 
-	pdev->dev.power.power_state = 0;
+	pdev->dev.power.power_state = PMSG_ON;
 
  bail:
 	release_console_sem();
diff -puN drivers/video/cyber2000fb.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers drivers/video/cyber2000fb.c
--- 25/drivers/video/cyber2000fb.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers	Thu Feb 17 16:40:08 2005
+++ 25-akpm/drivers/video/cyber2000fb.c	Thu Feb 17 16:40:08 2005
@@ -1665,7 +1665,7 @@ static void __devexit cyberpro_pci_remov
 	}
 }
 
-static int cyberpro_pci_suspend(struct pci_dev *dev, u32 state)
+static int cyberpro_pci_suspend(struct pci_dev *dev, pm_message_t state)
 {
 	return 0;
 }
diff -puN drivers/video/i810/i810_main.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers drivers/video/i810/i810_main.c
--- 25/drivers/video/i810/i810_main.c~fix-u32-vs-pm_message_t-confusion-in-framebuffers	Thu Feb 17 16:40:08 2005
+++ 25-akpm/drivers/video/i810/i810_main.c	Thu Feb 17 16:40:08 2005
@@ -1524,7 +1524,7 @@ static int i810fb_suspend(struct pci_dev
 		pci_disable_device(dev);
 	}
 	pci_save_state(dev);
-	pci_set_power_state(dev, state);
+	pci_set_power_state(dev, pci_choose_state(dev, state));
 
 	return 0;
 }
diff -puN drivers/video/i810/i810_main.h~fix-u32-vs-pm_message_t-confusion-in-framebuffers drivers/video/i810/i810_main.h
--- 25/drivers/video/i810/i810_main.h~fix-u32-vs-pm_message_t-confusion-in-framebuffers	Thu Feb 17 16:40:08 2005
+++ 25-akpm/drivers/video/i810/i810_main.h	Thu Feb 17 16:40:08 2005
@@ -18,7 +18,7 @@ static int  __devinit i810fb_init_pci (s
 				       const struct pci_device_id *entry);
 static void __exit i810fb_remove_pci(struct pci_dev *dev);
 static int i810fb_resume(struct pci_dev *dev);
-static int i810fb_suspend(struct pci_dev *dev, u32 state);
+static int i810fb_suspend(struct pci_dev *dev, pm_message_t state);
 
 /*
  * voffset - framebuffer offset in MiB from aperture start address.  In order for
_
