From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: Re: [PATCH 1/2] staging:iio:hmc5843: Constify register tables and struct regmap_config
Date: Thu, 26 Feb 2015 10:11:24 +0100 [thread overview]
Message-ID: <1424941884.27971.4.camel@AMDC1943> (raw)
In-Reply-To: <54EDB7E5.2050809@kernel.org>
On śro, 2015-02-25 at 11:54 +0000, Jonathan Cameron wrote:
> On 24/02/15 09:41, Krzysztof Kozlowski wrote:
> > The regmap_access_table and regmap_config structures may be const
> > because they are not modified by the driver and regmap_init() accepts
> > pointer to const.
> >
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Applied to the togreg branch of iio.git. Note I ended up hand applying
> this due to DOS line endings and some fuzz.
Thanks! I rebased the patchsed on next-20150224 so I did not expect any
fuzz.
Best regards,
Krzysztof
>
> Jonathan
> > ---
> > drivers/staging/iio/magnetometer/hmc5843_i2c.c | 8 ++++----
> > drivers/staging/iio/magnetometer/hmc5843_spi.c | 8 ++++----
> > 2 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/staging/iio/magnetometer/hmc5843_i2c.c b/drivers/staging/iio/magnetometer/hmc5843_i2c.c
> > index 6acd614cdbc6..8346cf81fc2e 100644
> > --- a/drivers/staging/iio/magnetometer/hmc5843_i2c.c
> > +++ b/drivers/staging/iio/magnetometer/hmc5843_i2c.c
> > @@ -22,7 +22,7 @@ static const struct regmap_range hmc5843_readable_ranges[] = {
> > regmap_reg_range(0, HMC5843_ID_END),
> > };
> >
> > -static struct regmap_access_table hmc5843_readable_table = {
> > +static const struct regmap_access_table hmc5843_readable_table = {
> > .yes_ranges = hmc5843_readable_ranges,
> > .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges),
> > };
> > @@ -31,7 +31,7 @@ static const struct regmap_range hmc5843_writable_ranges[] = {
> > regmap_reg_range(0, HMC5843_MODE_REG),
> > };
> >
> > -static struct regmap_access_table hmc5843_writable_table = {
> > +static const struct regmap_access_table hmc5843_writable_table = {
> > .yes_ranges = hmc5843_writable_ranges,
> > .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges),
> > };
> > @@ -40,12 +40,12 @@ static const struct regmap_range hmc5843_volatile_ranges[] = {
> > regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG),
> > };
> >
> > -static struct regmap_access_table hmc5843_volatile_table = {
> > +static const struct regmap_access_table hmc5843_volatile_table = {
> > .yes_ranges = hmc5843_volatile_ranges,
> > .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges),
> > };
> >
> > -static struct regmap_config hmc5843_i2c_regmap_config = {
> > +static const struct regmap_config hmc5843_i2c_regmap_config = {
> > .reg_bits = 8,
> > .val_bits = 8,
> >
> > diff --git a/drivers/staging/iio/magnetometer/hmc5843_spi.c b/drivers/staging/iio/magnetometer/hmc5843_spi.c
> > index 98c4b57101c9..8e658f736e1f 100644
> > --- a/drivers/staging/iio/magnetometer/hmc5843_spi.c
> > +++ b/drivers/staging/iio/magnetometer/hmc5843_spi.c
> > @@ -19,7 +19,7 @@ static const struct regmap_range hmc5843_readable_ranges[] = {
> > regmap_reg_range(0, HMC5843_ID_END),
> > };
> >
> > -static struct regmap_access_table hmc5843_readable_table = {
> > +static const struct regmap_access_table hmc5843_readable_table = {
> > .yes_ranges = hmc5843_readable_ranges,
> > .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges),
> > };
> > @@ -28,7 +28,7 @@ static const struct regmap_range hmc5843_writable_ranges[] = {
> > regmap_reg_range(0, HMC5843_MODE_REG),
> > };
> >
> > -static struct regmap_access_table hmc5843_writable_table = {
> > +static const struct regmap_access_table hmc5843_writable_table = {
> > .yes_ranges = hmc5843_writable_ranges,
> > .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges),
> > };
> > @@ -37,12 +37,12 @@ static const struct regmap_range hmc5843_volatile_ranges[] = {
> > regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG),
> > };
> >
> > -static struct regmap_access_table hmc5843_volatile_table = {
> > +static const struct regmap_access_table hmc5843_volatile_table = {
> > .yes_ranges = hmc5843_volatile_ranges,
> > .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges),
> > };
> >
> > -static struct regmap_config hmc5843_spi_regmap_config = {
> > +static const struct regmap_config hmc5843_spi_regmap_config = {
> > .reg_bits = 8,
> > .val_bits = 8,
> >
> >
prev parent reply other threads:[~2015-02-26 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 9:41 [PATCH 1/2] staging:iio:hmc5843: Constify register tables and struct regmap_config Krzysztof Kozlowski
2015-02-24 9:41 ` [PATCH 2/2] iio: jsa1212: Constify " Krzysztof Kozlowski
2015-02-25 11:55 ` Jonathan Cameron
2015-02-25 11:54 ` [PATCH 1/2] staging:iio:hmc5843: Constify register tables and " Jonathan Cameron
2015-02-26 9:11 ` Krzysztof Kozlowski [this message]
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=1424941884.27971.4.camel@AMDC1943 \
--to=k.kozlowski@samsung.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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