[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100917122844.GD4322@rakim.wolfsonmicro.main>
Date: Fri, 17 Sep 2010 13:28:44 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Axel Lin <axel.lin@...il.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Liam Girdwood <lrg@...mlogic.co.uk>
Subject: Re: [PATCH] Regulator: lp3972 cleanup
On Fri, Sep 17, 2010 at 01:44:17PM +0800, Axel Lin wrote:
> - Logging the value for diagnostics if failed to detect device
> if (ret == 0 && (val & SYS_CONTROL1_INIT_MASK) != SYS_CONTROL1_INIT_VAL)
> ret = -ENODEV;
> if (ret < 0) {
> - dev_err(&i2c->dev, "failed to detect device\n");
> + dev_err(&i2c->dev, "failed to detect device: %d\n", ret);
This misses part of the point of my suggestion - if you don't match the
ID register then you'll log -ENODEV rather than the device ID that you
read back which would presumably be more useful for someone trying to
work out why the check triggered.
Lots of other good stuff in there, though:
Acked-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
--
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