From patchwork Wed Jan 25 08:50:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 92405 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2111027qgi; Wed, 25 Jan 2017 00:52:51 -0800 (PST) X-Received: by 10.84.210.232 with SMTP id a95mr1892058pli.31.1485334370951; Wed, 25 Jan 2017 00:52:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si22692721pgh.312.2017.01.25.00.52.50; Wed, 25 Jan 2017 00:52:50 -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=@linaro.org; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751319AbdAYIwn (ORCPT + 25 others); Wed, 25 Jan 2017 03:52:43 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36072 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304AbdAYIwl (ORCPT ); Wed, 25 Jan 2017 03:52:41 -0500 Received: by mail-wm0-f45.google.com with SMTP id c85so15683578wmi.1 for ; Wed, 25 Jan 2017 00:51:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Lo9Ou6EIogKHjZI6H3tEbIY98afL7345Z+vfOUbQjHc=; b=Z+LA0l/KgDVUdX6rtleTvefcYsGTKP9FCi0chaBWTxObl4miZiGINRzbJUeraLiWUT rpdIuAH3OMAg5sG34Sde/ZU45ZAI4DYedKFWAnuEv3gcZEo+ePOCrzNLbKV8aJXe8SdC H7IysF4/nIakj7JW4bBfpCUJ3B69apkn8aIdc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Lo9Ou6EIogKHjZI6H3tEbIY98afL7345Z+vfOUbQjHc=; b=jtG4MPrJsgmIA02o9QCuiwgaRuwEhoh7lHHBmB5S27qP+QDkZVOFyFdCKN7ihPiHEA F67Da5BHqP4FenLKb3v7/ABX9Jopxc2OQF1YN3Cqn6t9KVK62Su3a9HViVY5Bqu5JVZv /ciFfJwoo/qP++TOgW3nXRzAzpyQ4befzLcKWpcnY8QWzIDTEUsDVqfe89a0uhxS4tWH Bckf65OYl1zxwwAeH58D383kFBct/UalyFfU/1pB9gRmO89C4glDInOwPV4sEwJG5JVZ yK0zyB6YPAWf+TA2WqS9GY1Unl5apsP9E1UDZ1Gi/tTJmLXyyMWiwWbLt4c8xQe9l0Cv PqAA== X-Gm-Message-State: AIkVDXL9nTxGcNxYD4hG3uxR5ILmlFaLshjxKWhsPZ068aoJBYy5luZvzs9YH7QCVfSjXv2v X-Received: by 10.28.47.2 with SMTP id v2mr20374863wmv.138.1485334304363; Wed, 25 Jan 2017 00:51:44 -0800 (PST) Received: from lmenx321.st.com. ([80.215.0.75]) by smtp.gmail.com with ESMTPSA id a35sm24018901wra.21.2017.01.25.00.51.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Jan 2017 00:51:43 -0800 (PST) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: sfr@canb.auug.org.au, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, thierry.reding@gmail.com, lee.jones@linaro.org Cc: Benjamin Gaignard Subject: [PATCH] pwm: STM32 fix compilation warning Date: Wed, 25 Jan 2017 09:50:47 +0100 Message-Id: <1485334247-28996-1-git-send-email-benjamin.gaignard@st.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org remove useless curstate variable. Fixes: bafffb6e7bd1 ("pwm: Add driver for STM32 plaftorm") Signed-off-by: Benjamin Gaignard --- drivers/pwm/pwm-stm32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c index ce6232e..6139512 100644 --- a/drivers/pwm/pwm-stm32.c +++ b/drivers/pwm/pwm-stm32.c @@ -189,7 +189,6 @@ static void stm32_pwm_disable(struct stm32_pwm *priv, int ch) static int stm32_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) { - struct pwm_state curstate; bool enabled; struct stm32_pwm *priv = to_stm32_pwm_dev(chip); int ret; @@ -201,7 +200,7 @@ static int stm32_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, return 0; } - if (state->polarity != curstate.polarity) + if (state->polarity != pwm->state.polarity) stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity); ret = stm32_pwm_config(priv, pwm->hwpwm,