From patchwork Thu Sep 8 10:48:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 75763 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp774801qgf; Thu, 8 Sep 2016 03:49:11 -0700 (PDT) X-Received: by 10.66.222.37 with SMTP id qj5mr92190699pac.145.1473331750904; Thu, 08 Sep 2016 03:49:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vv2si26437062pab.2.2016.09.08.03.49.10; Thu, 08 Sep 2016 03:49:10 -0700 (PDT) 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=@baylibre-com.20150623.gappssmtp.com; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758992AbcIHKtH (ORCPT + 27 others); Thu, 8 Sep 2016 06:49:07 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37641 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758877AbcIHKsd (ORCPT ); Thu, 8 Sep 2016 06:48:33 -0400 Received: by mail-wm0-f50.google.com with SMTP id w12so81258277wmf.0 for ; Thu, 08 Sep 2016 03:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=flghUed4TDizcDUW7XSP7jBhEZNJAwWe9iSSwvqp9Gg=; b=E4j5lhLxlPiJ9lH2Fq++dZgltNdhvIEUurDDS5W8zxh3nsImDT3JddEzpzUGF43fVC rLyVwwrcm3QLqid9NUM1JPOkeFKYBgFn+IbOc7NbkQ2IEezwKfDKyfWpuNbXAQjlsDif oJLcQvGndZ71srWPEkHTs2oGy2133bq5rEj30RtMMwRKUKXX+JXqjj9NxNAUJN5eWF81 iC8qIvI3WMgE2ux0tc1JhCGOHzYXhSwX0rKfUj50Fjv6FKjXc6QeAxCMFj17xEyDl/hG zQKlXOBS8T1wxqsWsJ8sZJniXBWF9S34xYmjrf8w3SBZV5iF2f+tEi1ZSLfmt8jsUgK9 8S3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=flghUed4TDizcDUW7XSP7jBhEZNJAwWe9iSSwvqp9Gg=; b=fhPstqRN1Gnb3ipCPISUR76VurjXsr+ZHxuTzYE6+cC6dQYOU2r+4r6WY6du9CNirk ouhXN1DrfJgGnqG9NrWA8LSNhaod8T+ribQSUZukxa3xPNrNiKlL+KlqMi4oDtoOujsH SyRm7hy86UphEpJimfGBSrqCk4jLu6nYpxbMh5frY0O84VGtOnaULbxL6Jvo/G95P6yS yuGMP9EHrPl+2xdTF4x+2Z7TFkBwfedxLCFAtepciq1AnuE1N9FVQP1EpYpyMh5yDu66 IlEpK+89+QSpitRu9CkSpZRcwx0ERnv1DPSNFF5CQNje/n3QWPrW+IfN0ull1czJjhmO ot6A== X-Gm-Message-State: AE9vXwP/BIWe2BK9dtNcQQ7GyYhOU+ThnK6DPhMgN60AB/H60gQTphJ+0g4JS2agXYIPlAPG X-Received: by 10.194.236.68 with SMTP id us4mr44245585wjc.12.1473331712122; Thu, 08 Sep 2016 03:48:32 -0700 (PDT) Received: from bgdev-debian.lan (jua06-1-82-242-157-225.fbx.proxad.net. [82.242.157.225]) by smtp.gmail.com with ESMTPSA id t5sm7151832wjm.12.2016.09.08.03.48.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Sep 2016 03:48:31 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Alexandre Courbot , Andy Shevchenko , Vignesh R , Yong Li , Geert Uytterhoeven Cc: linux-gpio , LKML , Bartosz Golaszewski Subject: [PATCH v5 4/6] gpio: pca953x: remove an unused variable Date: Thu, 8 Sep 2016 12:48:20 +0200 Message-Id: <1473331702-26711-5-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1473331702-26711-1-git-send-email-bgolaszewski@baylibre.com> References: <1473331702-26711-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The chip_type variable in struct pca953x_chip is no longer required. Remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-pca953x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 4c46cc8..02893c6 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -129,7 +129,6 @@ struct pca953x_chip { struct i2c_client *client; struct gpio_chip gpio_chip; const char *const *names; - int chip_type; unsigned long driver_data; const struct pca953x_reg_config *regs; @@ -771,8 +770,6 @@ static int pca953x_probe(struct i2c_client *client, } } - chip->chip_type = PCA_CHIP_TYPE(chip->driver_data); - mutex_init(&chip->i2c_lock); /* initialize cached registers from their original values. @@ -794,7 +791,7 @@ static int pca953x_probe(struct i2c_client *client, chip->read_regs = pca953x_read_regs_16; } - if (chip->chip_type == PCA953X_TYPE) + if (PCA_CHIP_TYPE(chip->driver_data) == PCA953X_TYPE) ret = device_pca953x_init(chip, invert); else ret = device_pca957x_init(chip, invert);