On Friday, 2 February 2007 16:08, Stefan Seyfried wrote: > On Fri, Feb 02, 2007 at 03:05:43PM +0100, Pavel Machek wrote: > > > Lets make a deal. You retransmit a patch (so I don't have to search > > Signed-off-by: Stefan Seyfried <[EMAIL PROTECTED]> > > diff -rup linux-2.6.20-rc6.orig/kernel/power/main.c > linux-2.6.20-rc6/kernel/power/main.c > --- linux-2.6.20-rc6.orig/kernel/power/main.c 2007-02-01 01:07:38.000000000 > +0100 > +++ linux-2.6.20-rc6/kernel/power/main.c 2007-02-01 22:24:41.000000000 > +0100 > @@ -116,7 +116,10 @@ int suspend_enter(suspend_state_t state) > printk(KERN_ERR "Some devices failed to power down\n"); > goto Done; > } > - error = pm_ops->enter(state); > + if (pm_ops && pm_ops->enter) > + error = pm_ops->enter(state); > + else > + error = -ENODEV; > device_power_up(); > Done: > local_irq_restore(flags); > Only in linux-2.6.20-rc6/kernel/power: main.c.orig > diff -rup linux-2.6.20-rc6.orig/kernel/power/user.c > linux-2.6.20-rc6/kernel/power/user.c > --- linux-2.6.20-rc6.orig/kernel/power/user.c 2007-02-01 01:07:38.000000000 > +0100 > +++ linux-2.6.20-rc6/kernel/power/user.c 2007-02-01 22:25:48.000000000 > +0100 > @@ -292,7 +292,7 @@ static int snapshot_ioctl(struct inode * > break; > } > > - if (pm_ops->prepare) { > + if (pm_ops && pm_ops->prepare) { > error = pm_ops->prepare(PM_SUSPEND_MEM); > if (error) > goto OutS3; > @@ -311,7 +311,7 @@ static int snapshot_ioctl(struct inode * > device_resume(); > } > resume_console(); > - if (pm_ops->finish) > + if (pm_ops && pm_ops->finish) > pm_ops->finish(PM_SUSPEND_MEM); > > OutS3: > @@ -322,20 +322,25 @@ static int snapshot_ioctl(struct inode * > switch (arg) { > > case PMOPS_PREPARE: > - if (pm_ops->prepare) { > + if (pm_ops && pm_ops->prepare) > error = pm_ops->prepare(PM_SUSPEND_DISK); > - } > + else > + error = -ENODEV; > break; > > case PMOPS_ENTER: > kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); > - error = pm_ops->enter(PM_SUSPEND_DISK); > + if (pm_ops && pm_ops->enter) > + error = pm_ops->enter(PM_SUSPEND_DISK); > + else > + error = -ENODEV; > break; > > case PMOPS_FINISH: > - if (pm_ops && pm_ops->finish) { > + if (pm_ops && pm_ops->finish) > pm_ops->finish(PM_SUSPEND_DISK); > - } > + else > + error = -ENODEV; > break; > > default: > > > for a copy) and get it to the -suse, and I'll get it to the -mm. Ok?
I think I can prepare the -mm patch. > Unfortunately i can not get it to -suse, since i don't have any access, so > it will probably still be up to you to do that. But i will attach the > patch against the suse kernel tree to the bug report. We can, however, > also just fix it upstream and 10.3 will just get it. It _is_ easy to > work around on 10.2 (shutdown method = shutdown). > > BTW: i am not too sure about that ENODEV, i just took the first error code > that came to my mind. But if nobody objects.... :-) IMHO ENOSYS would be better. Greetings, Rafael -- If you don't have the time to read, you don't have the time or the tools to write. - Stephen King ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel