All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@cs.man.ac.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, linux-pm@osdl.org
Subject: [-mm PATCH] driver model: PM type checking in drivers/video
Date: Fri, 04 Feb 2005 22:20:10 +0000	[thread overview]
Message-ID: <4203F51A.10302@cs.man.ac.uk> (raw)

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

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

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


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

diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/video/aty/radeon_pm.c linux-dsd/drivers/video/aty/radeon_pm.c
--- linux-2.6.11-rc2-mm2/drivers/video/aty/radeon_pm.c	2005-02-02 21:55:28.000000000 +0000
+++ linux-dsd/drivers/video/aty/radeon_pm.c	2005-02-02 21:58:53.000000000 +0000
@@ -2596,7 +2596,7 @@ int radeonfb_pci_resume(struct pci_dev *
         struct radeonfb_info *rinfo = info->par;
 	int rc = 0;
 
-	if (pdev->dev.power.power_state == 0)
+	if (pdev->dev.power.power_state == PMSG_ON)
 		return 0;
 
 	if (rinfo->no_schedule) {
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/video/backlight/corgi_bl.c linux-dsd/drivers/video/backlight/corgi_bl.c
--- linux-2.6.11-rc2-mm2/drivers/video/backlight/corgi_bl.c	2005-02-02 21:55:28.000000000 +0000
+++ linux-dsd/drivers/video/backlight/corgi_bl.c	2005-02-02 20:08:15.000000000 +0000
@@ -81,7 +81,7 @@ static void corgibl_blank(int blank)
 }
 
 #ifdef CONFIG_PM
-static int corgibl_suspend(struct device *dev, u32 state, u32 level)
+static int corgibl_suspend(struct device *dev, pm_message_t state, u32 level)
 {
 	if (level == SUSPEND_POWER_DOWN)
 		corgibl_blank(FB_BLANK_POWERDOWN);
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/video/i810/i810_main.c linux-dsd/drivers/video/i810/i810_main.c
--- linux-2.6.11-rc2-mm2/drivers/video/i810/i810_main.c	2005-02-02 21:55:28.000000000 +0000
+++ linux-dsd/drivers/video/i810/i810_main.c	2005-02-02 20:13:21.000000000 +0000
@@ -1492,7 +1492,7 @@ static struct fb_ops i810fb_ops __devini
 /***********************************************************************
  *                         Power Management                            *
  ***********************************************************************/
-static int i810fb_suspend(struct pci_dev *dev, u32 state)
+static int i810fb_suspend(struct pci_dev *dev, pm_message_t state)
 {
 	struct fb_info *info = pci_get_drvdata(dev);
 	struct i810fb_par *par = (struct i810fb_par *) info->par;
@@ -1538,7 +1538,7 @@ static int i810fb_resume(struct pci_dev 
 		return 0;
 
 	pci_restore_state(dev);
-	pci_set_power_state(dev, 0);
+	pci_set_power_state(dev, PCI_D0);
 	pci_enable_device(dev);
 	agp_bind_memory(par->i810_gtt.i810_fb_memory,
 			par->fb.offset);
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/video/pxafb.c linux-dsd/drivers/video/pxafb.c
--- linux-2.6.11-rc2-mm2/drivers/video/pxafb.c	2005-02-02 21:54:21.000000000 +0000
+++ linux-dsd/drivers/video/pxafb.c	2005-02-02 20:01:56.000000000 +0000
@@ -942,7 +942,7 @@ pxafb_freq_policy(struct notifier_block 
  * Power management hooks.  Note that we won't be called from IRQ context,
  * unlike the blank functions above, so we may sleep.
  */
-static int pxafb_suspend(struct device *dev, u32 state, u32 level)
+static int pxafb_suspend(struct device *dev, pm_message_t state, u32 level)
 {
 	struct pxafb_info *fbi = dev_get_drvdata(dev);
 
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/video/sa1100fb.c linux-dsd/drivers/video/sa1100fb.c
--- linux-2.6.11-rc2-mm2/drivers/video/sa1100fb.c	2005-02-02 21:54:21.000000000 +0000
+++ linux-dsd/drivers/video/sa1100fb.c	2005-02-02 20:02:48.000000000 +0000
@@ -1307,7 +1307,7 @@ sa1100fb_freq_policy(struct notifier_blo
  * Power management hooks.  Note that we won't be called from IRQ context,
  * unlike the blank functions above, so we may sleep.
  */
-static int sa1100fb_suspend(struct device *dev, u32 state, u32 level)
+static int sa1100fb_suspend(struct device *dev, pm_message_t state, u32 level)
 {
 	struct sa1100fb_info *fbi = dev_get_drvdata(dev);
 
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/video/savage/savagefb.c linux-dsd/drivers/video/savage/savagefb.c
--- linux-2.6.11-rc2-mm2/drivers/video/savage/savagefb.c	2004-12-24 21:34:45.000000000 +0000
+++ linux-dsd/drivers/video/savage/savagefb.c	2005-02-02 20:14:38.000000000 +0000
@@ -2100,7 +2100,7 @@ static void __devexit savagefb_remove (s
 	}
 }
 
-static int savagefb_suspend (struct pci_dev* dev, u32 state)
+static int savagefb_suspend (struct pci_dev* dev, pm_message_t state)
 {
 	struct fb_info *info =
 		(struct fb_info *)pci_get_drvdata(dev);
@@ -2115,7 +2115,7 @@ static int savagefb_suspend (struct pci_
 	release_console_sem();
 
 	pci_disable_device(dev);
-	pci_set_power_state(dev, state);
+	pci_set_power_state(dev, pci_choose_state(dev, state));
 
 	return 0;
 }
@@ -2128,7 +2128,7 @@ static int savagefb_resume (struct pci_d
 
 	DBG("savage_resume");
 
-	pci_set_power_state(dev, 0);
+	pci_set_power_state(dev, PCI_D0);
 	pci_restore_state(dev);
 	if(pci_enable_device(dev))
 		DBG("err");
diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/video/w100fb.c linux-dsd/drivers/video/w100fb.c
--- linux-2.6.11-rc2-mm2/drivers/video/w100fb.c	2005-02-02 21:54:21.000000000 +0000
+++ linux-dsd/drivers/video/w100fb.c	2005-02-02 20:04:16.000000000 +0000
@@ -535,7 +535,7 @@ static void w100fb_clear_buffer(void)
 
 
 #ifdef CONFIG_PM
-static int w100fb_suspend(struct device *dev, u32 state, u32 level)
+static int w100fb_suspend(struct device *dev, pm_message_t state, u32 level)
 {
 	if (level == SUSPEND_POWER_DOWN) {
 		struct fb_info *info = dev_get_drvdata(dev);

                 reply	other threads:[~2005-02-04 22:20 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=4203F51A.10302@cs.man.ac.uk \
    --to=dsd@cs.man.ac.uk \
    --cc=akpm@osdl.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --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.