On Tuesday 21 July 2009, Manuel Lauss wrote: > >> -#ifdef CONFIG_PM > > > > Won't the removal of this test cause a build failure if CONFIG_PM is > > not set? If the removal of the test is safe, this should IMHO at > > least be explained in the commit message. > > No, it builds just fine without CONFIG_PM; it was there to shave off a > few bytes from the kernel image. But not everyone tests this driver > with CONFIG_PM=y, because apparently noone really needed PM on > this platform (Alchemy), and a full build of most of the boards using > this driver fails with PM enabled. OK. > This way the PM methods at least get a compile-test in the non-pm case. Not sure that is a sufficiently valid argument. In any case it *is* a separate change to "dev_pm_ops conversion" so it really should at least be documented and justified in the commit log. > I like what Magnus Damm did for some of the SuperH drivers: > > #ifdef CONFIG_PM > [...] > #define DRIVER_PM_OPS (&driver_pm_ops) > #else > #define DRIVER_PM_OPS NULL > #endif Yes, that's quite elegant. > I'd like to keep the pm stuff enabled at all times since it doesn't > hurt in the non-pm case and if kernel size becomes a problem I can add > the #defines back. I guess that's up to the maintainers of the mips port. Cheers, FJP