Hi,

A while back I proposed a patch to support powerpc. The comments where
that it was a bit ugly with all those #ifdef's. Now the question is how
do I do this neatly?

Of all the functions in s2ram there is only one that would be really
duplicated. Then there is main() en a few functions that we would need
because they are part of the interface that suspend.c uses.

I could solve this as Stefan suggested like this:

#ifdef CONFIG_PPC
int s2ram_hacks(void) return 0;
#else
int s2ram_hacks(void)
{
        int ret = 0;

        /* 0 means: don't touch what was set on kernel commandline */
        if (flags & (S3_BIOS | S3_MODE))
.
.
.
}
#end

for a few functions. Still I would put a large part in #ifdef/#end
blocks, just because it is not used. Also there will be some #ifdefs left
in main.

Would that be acceptable? Any other ideas?

grts Tim

Attachment: signature.asc
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to