[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bc64b4640801031731s1e36c576i399a0b9efed59f49@mail.gmail.com>
Date: Fri, 4 Jan 2008 04:31:10 +0300
From: Dmitry <dbaryshkov@...il.com>
To: cbouatmailru@...il.com
Cc: linux-kernel@...r.kernel.org, cbou@...l.ru, dwmw2@...radead.org
Subject: Re: [PATCH] pda-power: only register available psu
Hi, Anton,
2008/1/4, Anton Vorontsov <cbouatmailru@...il.com>:
> Hi Dmitry,
>
> On Thu, Jan 03, 2008 at 03:53:19AM +0300, Dmitry Baryshkov wrote:
> > Currently pda-power adds both ac and usb power supply units.
> > This patch fixes it so that psu are added only if they are enabled.
>
> Thanks for the patch, this should be fixed of course. A comment
> though...
>
> > Signed-off-by: Dmitry Baryshkov <dbaryshkov@...il.com>
> >
> > diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
> > index c058f28..42eac09 100644
> > --- a/drivers/power/pda_power.c
> > +++ b/drivers/power/pda_power.c
> [...]
> > if (ac_irq) {
> > + ret = power_supply_register(&pdev->dev, &pda_power_supplies[0]);
>
> I don't think we should check for IRQs when determining which one
> of power supplies to register. Better use is_{ac,usb}_online
> callbacks, this will not produce an obstacle to implement polling --
> when irqs aren't mandatory. I'll send my two pending patches to show
> the idea.
>
> For this particular issue, I think something like that should work.
> If it works for you, I'll commit that version, preserving your
> authorship, of course.
Yes, it works. Thank you very much!
--
With best wishes
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists