linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benson Leung <bleung@google.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Benson Leung <bleung@chromium.org>,
	Olof Johansson <olof@lixom.net>,
	Bhumika Goyal <bhumirks@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "platform/chrome: chromeos_laptop: make chromeos_laptop const"
Date: Tue, 6 Mar 2018 11:05:58 -0800	[thread overview]
Message-ID: <20180306190558.GA60955@decatoncale.mtv.corp.google.com> (raw)
In-Reply-To: <20180306185915.GA93346@dtor-ws>

[-- Attachment #1: Type: text/plain, Size: 4082 bytes --]

On Tue, Mar 06, 2018 at 10:59:15AM -0800, Dmitry Torokhov wrote:
> This reverts commit a376cd91606365609d8fbd57247618bd51da1fc6 because
> chromeos_laptop instances should not be marked as "const" (at this
> time), since i2c_peripheral is being modified (we change "state" and
> "tries") when we instantiate devices.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks for the catch, Dmitry.

Applied.

> ---
>  drivers/platform/chrome/chromeos_laptop.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
> index 6dec6ab13300..d8599736a41a 100644
> --- a/drivers/platform/chrome/chromeos_laptop.c
> +++ b/drivers/platform/chrome/chromeos_laptop.c
> @@ -423,7 +423,7 @@ static int chromeos_laptop_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static const struct chromeos_laptop samsung_series_5_550 = {
> +static struct chromeos_laptop samsung_series_5_550 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
> @@ -432,14 +432,14 @@ static const struct chromeos_laptop samsung_series_5_550 = {
>  	},
>  };
>  
> -static const struct chromeos_laptop samsung_series_5 = {
> +static struct chromeos_laptop samsung_series_5 = {
>  	.i2c_peripherals = {
>  		/* Light Sensor. */
>  		{ .add = setup_tsl2583_als, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop chromebook_pixel = {
> +static struct chromeos_laptop chromebook_pixel = {
>  	.i2c_peripherals = {
>  		/* Touch Screen. */
>  		{ .add = setup_atmel_1664s_ts, I2C_ADAPTER_PANEL },
> @@ -450,14 +450,14 @@ static const struct chromeos_laptop chromebook_pixel = {
>  	},
>  };
>  
> -static const struct chromeos_laptop hp_chromebook_14 = {
> +static struct chromeos_laptop hp_chromebook_14 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
>  	},
>  };
>  
> -static const struct chromeos_laptop dell_chromebook_11 = {
> +static struct chromeos_laptop dell_chromebook_11 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
> @@ -466,28 +466,28 @@ static const struct chromeos_laptop dell_chromebook_11 = {
>  	},
>  };
>  
> -static const struct chromeos_laptop toshiba_cb35 = {
> +static struct chromeos_laptop toshiba_cb35 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
>  	},
>  };
>  
> -static const struct chromeos_laptop acer_c7_chromebook = {
> +static struct chromeos_laptop acer_c7_chromebook = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop acer_ac700 = {
> +static struct chromeos_laptop acer_ac700 = {
>  	.i2c_peripherals = {
>  		/* Light Sensor. */
>  		{ .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop acer_c720 = {
> +static struct chromeos_laptop acer_c720 = {
>  	.i2c_peripherals = {
>  		/* Touchscreen. */
>  		{ .add = setup_atmel_1664s_ts, I2C_ADAPTER_DESIGNWARE_1 },
> @@ -500,14 +500,14 @@ static const struct chromeos_laptop acer_c720 = {
>  	},
>  };
>  
> -static const struct chromeos_laptop hp_pavilion_14_chromebook = {
> +static struct chromeos_laptop hp_pavilion_14_chromebook = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop cr48 = {
> +static struct chromeos_laptop cr48 = {
>  	.i2c_peripherals = {
>  		/* Light Sensor. */
>  		{ .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },
> -- 
> 2.16.2.395.g2e18187dfd-goog
> 
> 
> -- 
> Dmitry

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2018-03-06 19:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 18:59 [PATCH] Revert "platform/chrome: chromeos_laptop: make chromeos_laptop const" Dmitry Torokhov
2018-03-06 19:05 ` Benson Leung [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=20180306190558.GA60955@decatoncale.mtv.corp.google.com \
    --to=bleung@google.com \
    --cc=bhumirks@gmail.com \
    --cc=bleung@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.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).