Received: by 10.223.185.116 with SMTP id b49csp4173540wrg; Tue, 6 Mar 2018 11:01:13 -0800 (PST) X-Google-Smtp-Source: AG47ELvnIaL30kRqocWWQD1HDoh3nrlvT/5+qCsy/CxRvZPy/Ro/i4UE/AfXnlzLoQXqWijzrb7A X-Received: by 2002:a17:902:424:: with SMTP id 33-v6mr17936861ple.433.1520362872985; Tue, 06 Mar 2018 11:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520362872; cv=none; d=google.com; s=arc-20160816; b=TMictTpB8xNIjWbHe4WEd/NVfugUFoA6NcR2/O44dWbSjoVLrv+JfDwvrmzo3iVzAK dgej3Xig0g7YQt86m70uNKsrO6ZQxDjKgbF/MoaXNYwgfTh0BoXuwUgvZkmcPIVYuSUd JisSxLYTsXtG/qKOH+Y5TlgKbdXIjmvE8IMx7GmDcAGy0vQldvJtt3EHZoOsWMG93fNy 4A4iw3pZPU9PQMsBJEl4xL+3iXwzj+LTHPPaxBQ53p7gBuyAc5+hnOZIlX3J1Y995aw3 Z/gOzaw1nOzQ0iE5hVH6Q9K8zNhEPt1OF+XVg7KGVUquXBOA14ykgdamx+nYLAnjriNw JeLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=XEjyg8lZPQyvWZUbW75NcvQOAQI736qidDRTVRznUJU=; b=tdhnZzb8Lj1Fiq/dk8UFlD02LQAaVPlDPCAUiOomFufxWj2op5NFCb2KE2oJdFXhvV X+mODamu2RzrBheTEH/rQiUB4ix03SFd9I4EtfXblQ8n7SK+9l44pV1vVZCoFAEbVAd1 5EICLC7N/pAGVHjZWn3QqxuCH9InLHR/x1kycO13jui1VqGDneV4b9SsoDc330eC6QDN V9AIsSWSTzA28p4Ze7mPgU6y3TFmKiInkqhpm+wiSWlS6XOnc98GC/33b/Dv/H5Z//i+ XJ0XfI6nNCUrtG3lX07sfYNlMKkQNeF5riIIvOH9dbzKdoWZ/fBMpUlul7cXB7Y5XfXf Uv+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tmE0e/HJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si10185339pgv.581.2018.03.06.11.00.57; Tue, 06 Mar 2018 11:01:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tmE0e/HJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933061AbeCFS7V (ORCPT + 99 others); Tue, 6 Mar 2018 13:59:21 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:42145 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932865AbeCFS7T (ORCPT ); Tue, 6 Mar 2018 13:59:19 -0500 Received: by mail-pg0-f65.google.com with SMTP id y8so8632165pgr.9 for ; Tue, 06 Mar 2018 10:59:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=XEjyg8lZPQyvWZUbW75NcvQOAQI736qidDRTVRznUJU=; b=tmE0e/HJpRNZHyv166sE45nrFhOC8dZWA0L7ZUGctNDKxxAdVgUOdpAJX/JyLP9UzK iystwEEOFVYlhazcnNGWCp1YNCWDkIkx4ZGpiSuKrV8jLskgJfD+yVXhuASz2DnmX35u zm+mFOjBu210D0AH3EpI0TCNgUzntqS1qNaoAWJQHKQYFzd1trGZdQ46QAuI72bXBRra 26u9YyRxYZjJx7cMutKydd2mr7kQbZPiL1IULO0jmgCxiF6oymNzMoyRNlVW+FBaYUsK dnqQV4hdbm0t++gjDNfsV2g+xnWwKym9spJBJZpih/oau0O7dx5SOQ5hSeHpfA2MB2uK iZwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=XEjyg8lZPQyvWZUbW75NcvQOAQI736qidDRTVRznUJU=; b=reBU5fLZ5Hnf824viBKPR47IYbxejd89GYouTKEHtH3U6juejmw2MyBOEGf5VTxtos KlDngUBkO8yb2jNWjClKqvvqRKzL7TwwE7h8lvLJGrHaXqDbC1OJ7cCSuOTuBMSGlJ9m xUVK2Zvn/7M9kbcimlkgPLEVQv4X+TZsPIZhlit+zU6nEnGJV8B9Pllb3mXm8/wWyM+P K+TNBRhVXQLuUGGC/1SnqunxFlYvxb8Y8ETVrc3xPbeMSvBcj+3cbKauLhEjGL0VFfzI gbdP08qBW3i6YfnQtn5JLSDmUWjkXyj4K61/gqMTP2JCvIn0iL/o5kX/KkcBGRuDtfGY oG1A== X-Gm-Message-State: AElRT7FV368j0w4n9qAg2YrLdH1pznrNUdZsrzQguT0w+nssbpgJ15XJ AZYsssAIDjBjDOeC80K4h10= X-Received: by 10.167.131.135 with SMTP id u7mr13321821pfm.50.1520362758122; Tue, 06 Mar 2018 10:59:18 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id e19sm25051364pga.8.2018.03.06.10.59.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Mar 2018 10:59:17 -0800 (PST) Date: Tue, 6 Mar 2018 10:59:15 -0800 From: Dmitry Torokhov To: Benson Leung Cc: Olof Johansson , Bhumika Goyal , linux-kernel@vger.kernel.org Subject: [PATCH] Revert "platform/chrome: chromeos_laptop: make chromeos_laptop const" Message-ID: <20180306185915.GA93346@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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