[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111116161420.GJ29986@opensource.wolfsonmicro.com>
Date: Wed, 16 Nov 2011 16:14:21 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@...afoo.de>
Cc: Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
Jonathan Cameron <jic23@...nel.org>,
Michael Hennerich <michael.hennerich@...log.com>,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
device-drivers-devel@...ckfin.uclinux.org, drivers@...log.com
Subject: Re: [PATCH 3/7] regmap: Properly round cache_word_size
On Wed, Nov 16, 2011 at 04:28:18PM +0100, Lars-Peter Clausen wrote:
> + if (config->val_bits <= 8)
> + map->cache_word_size = 1;
> + else if (config->val_bits <= 16)
> + map->cache_word_size = 2;
> + else
> + return -EINVAL;
Just do val_bits + 7 if you're going to do this.
--
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