linux-mips
[Top] [All Lists]

Re: [PATCH] au1xmmc: dev_pm_ops conversion

To: Manuel Lauss <manuel.lauss@googlemail.com>
Subject: Re: [PATCH] au1xmmc: dev_pm_ops conversion
From: Frans Pop <elendil@planet.nl>
Date: Tue, 21 Jul 2009 16:48:43 +0200
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, manuel.lauss@gmail.com
In-reply-to: <f861ec6f0907202212h4b28982fjcb9787a3915d7ee7@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1248115882-20221-1-git-send-email-manuel.lauss@gmail.com> <200907202200.39288.elendil@planet.nl> <f861ec6f0907202212h4b28982fjcb9787a3915d7ee7@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: KMail/1.9.9
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

<Prev in Thread] Current Thread [Next in Thread>