* [PATCH] atyfb: Fix power management
@ 2004-11-03 3:15 Benjamin Herrenschmidt
2004-11-03 3:47 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-03 3:15 UTC (permalink / raw)
To: Andrew Morton
Cc: Linus Torvalds, Linux Fbdev development list, Antonino A. Daplas
Hi !
The PM code in atyfb got broken in the recent update. This is just a typo though,
here's a fix:
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/drivers/video/aty/atyfb_base.c
===================================================================
--- linux-work.orig/drivers/video/aty/atyfb_base.c 2004-11-03 14:13:10.319998376 +1100
+++ linux-work/drivers/video/aty/atyfb_base.c 2004-11-03 14:13:45.491651472 +1100
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] atyfb: Fix power management
2004-11-03 3:47 ` Linus Torvalds
@ 2004-11-03 3:45 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-03 3:45 UTC (permalink / raw)
To: Linus Torvalds
Cc: Andrew Morton, Linux Fbdev development list, Antonino A. Daplas
On Tue, 2004-11-02 at 19:47 -0800, Linus Torvalds wrote:
>
> On Wed, 3 Nov 2004, Benjamin Herrenschmidt wrote:
> >
> > 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?
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.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/drivers/video/aty/atyfb_base.c
===================================================================
--- linux-work.orig/drivers/video/aty/atyfb_base.c 2004-11-03 14:13:10.319998376 +1100
+++ linux-work/drivers/video/aty/atyfb_base.c 2004-11-03 14:13:45.491651472 +1100
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] atyfb: Fix power management
2004-11-03 3:15 [PATCH] atyfb: Fix power management Benjamin Herrenschmidt
@ 2004-11-03 3:47 ` Linus Torvalds
2004-11-03 3:45 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2004-11-03 3:47 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Andrew Morton, Linux Fbdev development list, Antonino A. Daplas
On Wed, 3 Nov 2004, Benjamin Herrenschmidt wrote:
>
> 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
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> Index: linux-work/drivers/video/aty/atyfb_base.c
> ===================================================================
> --- linux-work.orig/drivers/video/aty/atyfb_base.c 2004-11-03 14:13:10.319998376 +1100
> +++ linux-work/drivers/video/aty/atyfb_base.c 2004-11-03 14:13:45.491651472 +1100
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-03 3:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03 3:15 [PATCH] atyfb: Fix power management Benjamin Herrenschmidt
2004-11-03 3:47 ` Linus Torvalds
2004-11-03 3:45 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).