From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org,
Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Subject: Re: [PATCH v2 02/11] iio:bma180: Prefix remaining tables and functions with bma18_
Date: Sun, 14 Sep 2014 18:47:31 +0100 [thread overview]
Message-ID: <5415D4B3.5050006@kernel.org> (raw)
In-Reply-To: <1408488206-2633-3-git-send-email-pmeerw@pmeerw.net>
On 19/08/14 23:43, Peter Meerwald wrote:
> and minor cleanups
>
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Applied.
> ---
> drivers/iio/accel/bma180.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
> index f5e26fb..d7f34b4 100644
> --- a/drivers/iio/accel/bma180.c
> +++ b/drivers/iio/accel/bma180.c
> @@ -49,7 +49,7 @@
> #define BMA180_SMP_SKIP BIT(0)
>
> /* Bit masks for registers bit fields */
> -#define BMA180_RANGE 0x0e /* Range of measured accel values*/
> +#define BMA180_RANGE 0x0e /* Range of measured accel values */
> #define BMA180_BW 0xf0 /* Accel bandwidth */
> #define BMA180_MODE_CONFIG 0x03 /* Config operation modes */
>
> @@ -93,8 +93,8 @@ enum bma180_axis {
> AXIS_Z,
> };
>
> -static int bw_table[] = { 10, 20, 40, 75, 150, 300 }; /* Hz */
> -static int scale_table[] = { 1275, 1863, 2452, 3727, 4903, 9709, 19417 };
> +static int bma180_bw_table[] = { 10, 20, 40, 75, 150, 300 }; /* Hz */
> +static int bma180_scale_table[] = { 1275, 1863, 2452, 3727, 4903, 9709, 19417 };
>
> static int bma180_get_acc_reg(struct bma180_data *data, enum bma180_axis axis)
> {
> @@ -107,7 +107,7 @@ static int bma180_get_acc_reg(struct bma180_data *data, enum bma180_axis axis)
> ret = i2c_smbus_read_word_data(data->client, reg);
> if (ret < 0)
> dev_err(&data->client->dev,
> - "failed to read accel_%c registers\n", 'x' + axis);
> + "failed to read accel_%c register\n", 'x' + axis);
>
> return ret;
> }
> @@ -185,8 +185,8 @@ static int bma180_set_bw(struct bma180_data *data, int val)
> if (data->sleep_state)
> return -EBUSY;
>
> - for (i = 0; i < ARRAY_SIZE(bw_table); ++i) {
> - if (bw_table[i] == val) {
> + for (i = 0; i < ARRAY_SIZE(bma180_bw_table); ++i) {
> + if (bma180_bw_table[i] == val) {
> ret = bma180_set_bits(data,
> BMA180_BW_TCS, BMA180_BW, i);
> if (ret) {
> @@ -209,8 +209,8 @@ static int bma180_set_scale(struct bma180_data *data, int val)
> if (data->sleep_state)
> return -EBUSY;
>
> - for (i = 0; i < ARRAY_SIZE(scale_table); ++i)
> - if (scale_table[i] == val) {
> + for (i = 0; i < ARRAY_SIZE(bma180_scale_table); ++i)
> + if (bma180_scale_table[i] == val) {
> ret = bma180_set_bits(data,
> BMA180_OFFSET_LSB1, BMA180_RANGE, i);
> if (ret) {
>
next prev parent reply other threads:[~2014-09-14 17:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 22:43 [PATCH v2 00/11] iio:bma180: Add BMA250 support v2 Peter Meerwald
2014-08-19 22:43 ` [PATCH v2 01/11] iio:bma180: Enable use of device without IRQ Peter Meerwald
2014-09-14 17:47 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 02/11] iio:bma180: Prefix remaining tables and functions with bma18_ Peter Meerwald
2014-09-14 17:47 ` Jonathan Cameron [this message]
2014-08-19 22:43 ` [PATCH v2 03/11] iio:bma180: Rename BMA_180 to BMA180_ Peter Meerwald
2014-09-14 17:48 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 04/11] iio:bma180: Use bool instead of int for state Peter Meerwald
2014-09-14 17:48 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 05/11] iio:bma180: Expose temperature channel Peter Meerwald
2014-08-20 8:56 ` Daniel Baluta
2014-08-19 22:43 ` [PATCH v2 06/11] iio:bma180: Drop _update_scan_mode() Peter Meerwald
2014-09-14 19:20 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 07/11] iio:bma180: Introduce part_info to differentiate further chip variants Peter Meerwald
2014-09-14 19:20 ` Jonathan Cameron
2014-09-14 19:22 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 08/11] iio:bma180: Introduce part-specific _config() and disable() code Peter Meerwald
2014-09-14 19:20 ` Jonathan Cameron
2014-09-14 19:25 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 09/11] iio:bma180: Prepare for accelerometer channels with different resolutions Peter Meerwald
2014-09-14 19:26 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 10/11] iio:bma180: Implement _available sysfs attribute dynamically Peter Meerwald
2014-09-14 19:26 ` Jonathan Cameron
2014-08-19 22:43 ` [PATCH v2 11/11] iio:bma180: Add BMA250 chip support Peter Meerwald
2014-09-14 19:28 ` Jonathan Cameron
2014-09-14 20:00 ` Peter Meerwald
2014-09-14 20:41 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5415D4B3.5050006@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=o.v.kravchenko@globallogic.com \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).