Re: [PATCH] sbs-battery: probe should try talking to the device

From: Anton Vorontsov
Date: Thu Sep 20 2012 - 18:01:59 EST


On Thu, Sep 06, 2012 at 02:35:30PM -0400, Rhyland Klein wrote:
> On 09/06/2012 02:32 PM, Olof Johansson wrote:
> >Turns out this driver doesn't actually try talking to the device at
> >probe time, so if it's incorrectly configured in the device tree or
> >platform data (or if the battery has been removed from the system), then
> >probe will succeed and every access will sit there and time out. The
> >end result is a possibly laggy system that thinks it has a battery but
> >can never read status, which isn't very useful.
> >
> >Instead, just read any register (I chose status) at probe, and if that
> >fails, don't register the device.
> >
> >Signed-off-by: Olof Johansson <olof@xxxxxxxxx>
[...]
> Acked-by: Rhyland Klein <rklein@xxxxxxxxxx>

Applied, thank you folks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/