atyfb: Fix power management
PATCH 1/1 atyfb: Fix power management
Hi !
The PM code in atyfb got broken in the recent update. This is just a typo though, here's a fix:
drivers/video/aty/atyfb_base.c +1 -1
@@ -2015,7 +2015,7 @@ }mdelay (500 ); -return timeout ?-1 :0 ; +return timeout ?0 : -EIO ; }static int atyfb_pci_suspend (struct pci_dev *pdev,u32 state)
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Quoted 3 lines · Benjamin Herrenschmidt
The PM code in atyfb got broken in the recent update. This is just a typo though, here's a fix:
Ok, this comment makes no sense. Which is it? It's certainly more than a typo, you're literally changing the return value behaviour to be the reverse of what it was.
Now, I think your fix is right, but your checkin comment doesn't make any sense. Can you phrase that better?
Linus
Quoted 9 lines
Signed-off-by Benjamin Herrenschmidt <[email protected]>Index:
linux-work/drivers/video/aty/atyfb_base.c
===================================================================
drivers/video/aty/atyfb_base.c line 2021
Quoted 8 lines
drivers/video/aty/atyfb_base.c +1
-1@@ -2015,7 +2015,7 @@ }mdelay (500 ); -return timeout ?-1 :0 ; +return timeout ?0 : -EIO ; }static int atyfb_pci_suspend (struct pci_dev *pdev,u32 state)
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Quoted 6 lines · Linus Torvalds
Quoted 3 lines · Benjamin Herrenschmidt
The PM code in atyfb got broken in the recent update. This is just a typo though, here's a fix:
Quoted 6 lines
Ok, this comment makes no sense. Which is it? It's certainly more than a typo, you're literally changing the return value behaviour to be the reverse of what it was.
Now, I think your fix is right, but your checkin comment doesn't make any sense. Can you phrase that better?
Hrm... It's actually a typo/thinko when going from the "old style" pmac notifiers to the new PCI based code, I think it may even be me doing it a long time ago when I submitted a lot of atyfb updates to the fbdev tree. (I wrote that PM code)
Anyway, here's a better comment:
----
The new atyfb has the return value for the Power Management routine wrong. This prevents sleep from working on PowerBooks with mach64 video chips. This fixes it.
drivers/video/aty/atyfb_base.c +1 -1
@@ -2015,7 +2015,7 @@ }mdelay (500 ); -return timeout ?-1 :0 ; +return timeout ?0 : -EIO ; }static int atyfb_pci_suspend (struct pci_dev *pdev,u32 state)
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click