On Wed, 2007-05-02 at 22:13 +0200, Rafael J. Wysocki wrote:
> +void hibernation_set_ops(struct hibernation_ops *ops)
> +{
> + if (ops && !(ops->prepare && ops->enter && ops->finish)) {
> + printk(KERN_ERR "Wrong definition of hibernation operations! "
> + "Using defaults\n");
> + return;
> + }
Why not BUG_ON here as I had before? I don't see much point in giving a
runtime warning, and the docs clearly state that you must assign all
three items. Oh, I see I had a bug before when ops was NULL, but you can
still do
BUG_ON(ops && !(ops->prepare && ops->enter && ops->finish));
> - pr_debug("PM: suspend-to-disk mode set to '%s'\n",
> - pm_disk_modes[mode]);
> + if (!error)
> + pr_debug("PM: suspend-to-disk mode set to '%s'\n",
> + hibernation_modes[mode]);
Isn't that an unrelated bugfix ;) just kidding
Looks good to me but I haven't checked the acpi in detail. If I
remember, I'll try to give it all a go on my G5 later today.
johannes
signature.asc
Description: This is a digitally signed message part
