From: Jonathan Cameron <jic23@kernel.org>
To: Octavian Purdila <octavian.purdila@intel.com>,
Hartmut Knaack <knaack.h@gmx.de>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Laurentiu Palcu <laurentiu.palcu@intel.com>
Subject: Re: [PATCH 2/3] iio:accel:bmc150-accel: make use of mask definition
Date: Sun, 21 Jun 2015 14:45:01 +0100 [thread overview]
Message-ID: <5586BFDD.2000907@kernel.org> (raw)
In-Reply-To: <CAE1zotKLuJxTYzJZ84Gzi-dY1HqgGzmh3BheszWeka6Wi9XqtQ@mail.gmail.com>
On 16/06/15 11:34, Octavian Purdila wrote:
> On Tue, Jun 16, 2015 at 12:48 AM, Hartmut Knaack <knaack.h@gmx.de> wrote:
>> BMC150_ACCEL_SLOPE_THRES_MASK was defined some time ago, but its 'magic'
>> value got used instead in bmc150_accel_write_event(). Make use of it for
>> improved readability.
>>
>> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
>
> Reviewed-by: Octavian Purdila <octavian.purdila@intel.com>
Applied to the togreg branch of iio.git - initially pushed out as testing
etc etc.
>
>> ---
>> drivers/iio/accel/bmc150-accel.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/accel/bmc150-accel.c b/drivers/iio/accel/bmc150-accel.c
>> index cc5a357..36a9cd5 100644
>> --- a/drivers/iio/accel/bmc150-accel.c
>> +++ b/drivers/iio/accel/bmc150-accel.c
>> @@ -776,7 +776,7 @@ static int bmc150_accel_write_event(struct iio_dev *indio_dev,
>>
>> switch (info) {
>> case IIO_EV_INFO_VALUE:
>> - data->slope_thres = val & 0xFF;
>> + data->slope_thres = val & BMC150_ACCEL_SLOPE_THRES_MASK;
>> break;
>> case IIO_EV_INFO_PERIOD:
>> data->slope_dur = val & BMC150_ACCEL_SLOPE_DUR_MASK;
>> --
>> 2.3.6
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
next prev parent reply other threads:[~2015-06-21 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 21:48 [PATCH 0/3] bmc150-accel fixes and cleanup Hartmut Knaack
2015-06-15 21:48 ` [PATCH 1/3] iio:accel:bmc150-accel: fix counting direction Hartmut Knaack
2015-06-16 10:31 ` Octavian Purdila
2015-06-21 13:43 ` Jonathan Cameron
2015-06-15 21:48 ` [PATCH 2/3] iio:accel:bmc150-accel: make use of mask definition Hartmut Knaack
2015-06-16 10:34 ` Octavian Purdila
2015-06-21 13:45 ` Jonathan Cameron [this message]
2015-06-15 21:48 ` [PATCH 3/3] iio:accel:bmc150-accel: code style cleanup Hartmut Knaack
2015-06-16 10:33 ` Octavian Purdila
2015-06-21 13:46 ` 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=5586BFDD.2000907@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=laurentiu.palcu@intel.com \
--cc=linux-iio@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=pmeerw@pmeerw.net \
--cc=srinivas.pandruvada@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.