Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2555885imm; Fri, 20 Jul 2018 00:17:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpddg+sNvujSVlS3+JjBB5bq0m87cIFKS6ElWts90aLRksxsqH6FMhQ/sldpaZGfQuxmZn88 X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr967137plk.249.1532071075289; Fri, 20 Jul 2018 00:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532071075; cv=none; d=google.com; s=arc-20160816; b=BpqP5/3xhg05sQMxinAcmeeIAkbWt4354M6uVgd3PwRYH9zlLZyI58r/1DSYO830iZ 0AcNrqnYsHvrVCR0E8KPvwAi+hlv2sT4fCvs/H5Tv5snxUXSsGJAf1GX9CsLh+GJYT4o a0WE0p3lvyv0gUNAgaLxCweGoFXIFJyMDt9tCcDTCmoVYgbkkSkA8YBTRi6VE4fgawPJ NZmxwwEJKSIJNqRmINcZdTcyMkGr0cDPkVjSDYQGUG+JaEMiudlfd0m6fMDH/VTunvUi aUDppYKGGYdFm+e9v3KffenAPY1SrUpYwHYusMthkEjjBcKP/362HNcPMxsa2gLZkBmN 1ttA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=cHgA2iGPFSpQEhzEj7sLWWN8acEXKs32SyoHjB6O2PM=; b=yiuITc9ctYaee9oSMEge/sQKBygDxcbZrLJRgxKYOANgRd6MVxJHaruHj9r93YB4dM 5ZnZjSSed+xzAd68Bnk8JGWP6vQmgBQ+WoSV7L+UxVGFlH/TAv2Yh+0Zin9xJgBwKApc CuKQCsBU8BG2boSo73I565Y6T3aOmFyqsrAfAyMCQVjALk+NU6m/BQ3ahEw9EOS/DNXp 02j0mNUYG9UadaoIWOsiXJLqRH5I2kEHokrpeXSPxDf+LevqOYJZ0yszkvIwIE7v/jLa oiTE8PM2jGreBsA+A8SqWn7q4pdZBlEElmRC1NotMzFW7vE3jLjbnovVvzIwZYkDiNLO oLGg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b205-v6si1280875pfb.358.2018.07.20.00.17.39; Fri, 20 Jul 2018 00:17:55 -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; 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 S1727228AbeGTIDw (ORCPT + 99 others); Fri, 20 Jul 2018 04:03:52 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:50583 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727028AbeGTIDw (ORCPT ); Fri, 20 Jul 2018 04:03:52 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w6K7E2bD011311; Fri, 20 Jul 2018 09:16:45 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2k87uey5er-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 20 Jul 2018 09:16:45 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 59BBC31; Fri, 20 Jul 2018 07:16:44 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1527318FC; Fri, 20 Jul 2018 07:16:44 +0000 (GMT) Received: from localhost (10.75.127.48) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 20 Jul 2018 09:16:43 +0200 From: Fabrice Gasnier To: CC: , , , , , Subject: [PATCH] pwm: stm32-lp: Remove useless loop in stm32_pwm_lp_remove() Date: Fri, 20 Jul 2018 09:16:32 +0200 Message-ID: <1532070992-16831-1-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG4NODE1.st.com (10.75.127.10) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-20_02:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LPTimer has only one pwm channel (npwm = 1). Remove useless for loop in remove routine. Signed-off-by: Fabrice Gasnier --- drivers/pwm/pwm-stm32-lp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 7c13e25..0059b24c 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -217,10 +217,8 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev) static int stm32_pwm_lp_remove(struct platform_device *pdev) { struct stm32_pwm_lp *priv = platform_get_drvdata(pdev); - unsigned int i; - for (i = 0; i < priv->chip.npwm; i++) - pwm_disable(&priv->chip.pwms[i]); + pwm_disable(&priv->chip.pwms[0]); return pwmchip_remove(&priv->chip); } -- 1.9.1