From patchwork Sat Sep 10 06:38:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9324761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1FCB7607D3 for ; Sat, 10 Sep 2016 06:39:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDA0A29B82 for ; Sat, 10 Sep 2016 06:39:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E014D29B8B; Sat, 10 Sep 2016 06:39:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 741C829B82 for ; Sat, 10 Sep 2016 06:39:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bibwi-0002XR-MY; Sat, 10 Sep 2016 06:39:24 +0000 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bibwT-0002Vv-CS; Sat, 10 Sep 2016 06:39:10 +0000 Received: by mail-pa0-x244.google.com with SMTP id ez1so4822801pab.3; Fri, 09 Sep 2016 23:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lN14C6gIM72d0Zs6tRy9IO52hPeOsyz6XCbRI8+S/64=; b=Y5kEOrY6jPHjo27fnS2YCnBFnEk6FPEwjagFTiTmK1GVzHr++ODZROQK67FPDOFmbE RkRK9oPSjMjM5v57j4Fr6Nf1n7x3hdI2s1vTnnH0HxxjG19xbeSgjtBHa8vYucWG9Jeu ud5KLJoS634GXNqDSfVBZd5aqaiuuhhIvrt4huy3NbY5B6I4ty91/4SP0Ii30OAw+rLP erbNPMLqqZI/f4KNPjMvr3zTwUqQDbad4csJ3jQ8PlmSyv79laa2TqNBewEmTXlKU38+ hA/RxEgNA6oEbpeNjgJ9tjcMqr86RwntjF7nMc6sqMfvgSNZZeYelsm78ELgXEg2AJuF mAMg== 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:mime-version :content-transfer-encoding; bh=lN14C6gIM72d0Zs6tRy9IO52hPeOsyz6XCbRI8+S/64=; b=BXDWu89JiOzZtXh9HjWnKzKxn4ESy9nvcsYadsq3w+8egg2M4oX8QkAHpXigUSnG1e 1+k+nkAvr1NtywMMHHXaBoQUzyqukhdSj/UqxOPBLiCLKCtuL5nIkKiegiG4tQ2zdSut +ZujkO2YCWtD2abmln1D+1tyqwM2Yw8KI9vTeC09HmuJXxGtntMhhWi/1BAexHrlvfA7 FaNNBJS2DwqDQpCYNDN1d20WYk8/w52HkVvcU+wk3kgr5vP4dLAAuzuI+814bky+JagE jxWGMqSp4nQ/beEOvD9ItqNNr7hL9QwoHOSTxoyefgPHg43Muk+25Owzr5amytnsBur5 KdyQ== X-Gm-Message-State: AE9vXwPCayffYBBCC3MNMJB001dnLHbZrk6U7UENvlygKpnEbkSUFC4reXVVl6AQsuqaXA== X-Received: by 10.66.220.194 with SMTP id py2mr13185624pac.77.1473489528341; Fri, 09 Sep 2016 23:38:48 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id ps2sm9491278pab.10.2016.09.09.23.38.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 23:38:47 -0700 (PDT) From: Wei Yongjun To: Thierry Reding , Carlo Caione , Kevin Hilman , Neil Armstrong Subject: [PATCH -next] pwm: meson: Fix missing spin_lock_init() Date: Sat, 10 Sep 2016 06:38:38 +0000 Message-Id: <1473489518-17981-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160909_233909_531906_ED18FFA8 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Acked-by: Neil Armstrong --- drivers/pwm/pwm-meson.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index bfbbe7f..778d088 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -465,6 +465,7 @@ static int meson_pwm_probe(struct platform_device *pdev) if (IS_ERR(meson->base)) return PTR_ERR(meson->base); + spin_lock_init(&meson->lock); meson->chip.dev = &pdev->dev; meson->chip.ops = &meson_pwm_ops; meson->chip.base = -1;