LWN.net Logo

Re: [PATCH] leds: Fix warnings when PM is disabled for BD2802

From:  Andrew Morton <akpm-AT-linux-foundation.org>
To:  Dmitry Torokhov <dmitry.torokhov-AT-gmail.com>
Subject:  Re: [PATCH] leds: Fix warnings when PM is disabled for BD2802
Date:  Fri, 21 Jan 2011 16:23:25 -0800
Message-ID:  <20110121162325.c3b513bf.akpm@linux-foundation.org>
Cc:  Mark Brown <broonie-AT-opensource.wolfsonmicro.com>, linux-kernel-AT-vger.kernel.org, Richard Purdie <rpurdie-AT-rpsys.net>, "Rafael J. Wysocki" <rjw-AT-sisk.pl>
Archive-link:  Article, Thread

On Fri, 21 Jan 2011 15:38:37 -0800 Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:

> > That rather sucks.  It leaves an all-zeroes instance of dev_pm_ops
> > uselessly bloating the driver.
> 
> It is per-driver, not per device so do we really care?

We care about everything.  If the objective was to make life easier for
ourselves, we'd all be on the golf course.

> >  And it leaves
> > bd2802_i2c_driver.driver.pm pointing at that all-zeroes instance of
> > dev_pm_ops, which is rather dangerous.
> 
> Nothing dagerous here - PM core deals with half-filled pm_ops just fine.
> 
> > 
> > If CONFIG_PM_SLEEP=n, the .driver.pm field shouldn't exist at all.
> 
> Meh, we have _waaay_ too many config options, I'd rather see CONFIG_PM
> and possibly CONFIG_PM_SLEEP go, maybe leaving us with
> CONFIG_PM_RUNTIME and maybe not. How many devices out there do not want
> PM?

Don't know.  How do we determine this?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


(Log in to post comments)

Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds