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: 668337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sWPY64HsPz9t0Z for ; Sat, 10 Sep 2016 16:38:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Y5kEOrY6; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752879AbcIJGit (ORCPT ); Sat, 10 Sep 2016 02:38:49 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36036 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750895AbcIJGit (ORCPT ); Sat, 10 Sep 2016 02:38:49 -0400 Received: by mail-pa0-f65.google.com with SMTP id ez1so4822799pab.3 for ; 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=NlZUc//unXKR9skydWqEGwH7GmfAU+F2wiDZbDg78AbIMG1YcvTLAMJgUcwzefucdc 7VTl9haO5od7WxdlQD7ID1G+R+aZdxxzH2CHUfa/nvwv0uYF3ppBdR9pZ/sw0qZ8fhIh HimB11QVuvO53copZt7kaWZyowZNMjgX/MCPUKYL6DCPKpMk7f1zbGsVgbuE6boDKGLg 88+6YDN+BlghAm7sEeoxkaxf9/R/QOfVanl7u9bfWbd09OWHS7mKJPAuAYPomG75DbE3 Dcr4M2EFHiHr8d0+9ksUUJxulI4iy1ZFwgqFNo1+dyLW0eahJFJb3pa4JSGkoBhkH5yw Mzhg== X-Gm-Message-State: AE9vXwOo4yE8yfHTOO3L7+HOYc8KmwQ5E5VFCk7d3sK3SGTngSR9JJ0g/OQ3EuRQqAPTVQ== 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 Cc: Wei Yongjun , linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org 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 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org 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(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;