Message ID | 1424876018-17852-5-git-send-email-shawn.guo@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCV3TM5A74DRBV6EW6TQKGQEIXIW6SA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CD4C20502 for <linaro@patches.linaro.org>; Wed, 25 Feb 2015 14:55:20 +0000 (UTC) Received: by wesw55 with SMTP id w55sf3296647wes.0 for <linaro@patches.linaro.org>; Wed, 25 Feb 2015 06:55:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=fQz4/BIDDOUfujOrIS/9nsuK+sU/yy0QOeG9ib3Xz9g=; b=UPLJQEeAT9YCgbtM8GmLXuSRVTBUgDsfm45v6ku2XSqtAIY22Wi0Hf125ZR+CFg3F1 QFCFBwIMRr+2XKxR6rYNwzR90pTPCZlU3Hgp0Pzu54odXTkUzkLbHh1P9P0IjAjFD7gl 75Waopjv7ciYvBXVJf3bZbOEA5WhFfK/gj8O0JIlpG1Dgk/j6ooPtA7pV6cPj7CaVxSc 3D9YNjKH/DkG/l4SAQeYvHimdC89APQiYAbA7d8NkpnRITDC3m9Uop1cXWnYm6bgdzQQ 1ol4EwtJhesMsnPHkx0lfzgWnnHeJt4a70f+XCTmxxhF1fpaUysyF4+FrZrPqZkN+GTu AvCA== X-Gm-Message-State: ALoCoQnQ0IqXeyK+FF+9r2TrfUbpXpSs3ThK1TKLlx4PbxE7qXpRtHyPBFFGurP9d7+RT+yu/Ahu X-Received: by 10.181.13.236 with SMTP id fb12mr583618wid.1.1424876119460; Wed, 25 Feb 2015 06:55:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.104 with SMTP id r8ls218116lar.48.gmail; Wed, 25 Feb 2015 06:55:19 -0800 (PST) X-Received: by 10.152.45.37 with SMTP id j5mr3137963lam.31.1424876119304; Wed, 25 Feb 2015 06:55:19 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id k3si31004204lbj.176.2015.02.25.06.55.19 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 06:55:19 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbvp9 with SMTP id p9so4372600lbv.3 for <patchwork-forward@linaro.org>; Wed, 25 Feb 2015 06:55:19 -0800 (PST) X-Received: by 10.152.28.5 with SMTP id x5mr3066660lag.112.1424876119172; Wed, 25 Feb 2015 06:55:19 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2668572lbj; Wed, 25 Feb 2015 06:55:18 -0800 (PST) X-Received: by 10.68.178.100 with SMTP id cx4mr6104869pbc.158.1424876117247; Wed, 25 Feb 2015 06:55:17 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xt17si24191169pac.212.2015.02.25.06.55.16 for <patch@linaro.org>; Wed, 25 Feb 2015 06:55:17 -0800 (PST) Received-SPF: none (google.com: linux-serial-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752825AbbBYOzP (ORCPT <rfc822;patch@linaro.org>); Wed, 25 Feb 2015 09:55:15 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:34820 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752796AbbBYOzP (ORCPT <rfc822;linux-serial@vger.kernel.org>); Wed, 25 Feb 2015 09:55:15 -0500 Received: by pdbfl12 with SMTP id fl12so5410621pdb.2 for <linux-serial@vger.kernel.org>; Wed, 25 Feb 2015 06:55:14 -0800 (PST) X-Received: by 10.70.123.40 with SMTP id lx8mr6212306pdb.42.1424876114444; Wed, 25 Feb 2015 06:55:14 -0800 (PST) Received: from localhost.localdomain (119.81.172.112-static.reverse.softlayer.com. [119.81.172.112]) by mx.google.com with ESMTPSA id nd5sm41502517pbc.64.2015.02.25.06.55.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Feb 2015 06:55:13 -0800 (PST) From: Shawn Guo <shawn.guo@linaro.org> To: Mike Turquette <mturquette@linaro.org> Cc: linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Russell King <linux@arm.linux.org.uk>, Stephen Boyd <sboyd@codeaurora.org>, Thierry Reding <thierry.reding@gmail.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Mark Brown <broonie@kernel.org>, linux-pwm@vger.kernel.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, linux-serial@vger.kernel.org, Shawn Guo <shawn.guo@linaro.org> Subject: [PATCH 4/8] pwm: atmel-hlcdc: fix struct clk pointer comparing Date: Wed, 25 Feb 2015 22:53:34 +0800 Message-Id: <1424876018-17852-5-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424876018-17852-1-git-send-email-shawn.guo@linaro.org> References: <1424876018-17852-1-git-send-email-shawn.guo@linaro.org> Sender: linux-serial-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-serial@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shawn.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c index 522f7075bb1a..36475949b829 100644 --- a/drivers/pwm/pwm-atmel-hlcdc.c +++ b/drivers/pwm/pwm-atmel-hlcdc.c @@ -97,7 +97,7 @@ static int atmel_hlcdc_pwm_config(struct pwm_chip *c, pwmcfg = ATMEL_HLCDC_PWMPS(pres); - if (new_clk != chip->cur_clk) { + if (!clk_is_match(new_clk, chip->cur_clk)) { u32 gencfg = 0; int ret;
Since commit 035a61c314eb ("clk: Make clk API return per-user struct clk instances"), clk API users can no longer check if two struct clk pointers are pointing to the same hardware clock, i.e. struct clk_hw, by simply comparing two pointers. That's because with the per-user clk change, a brand new struct clk is created whenever clients try to look up the clock by calling clk_get() or sister functions like clk_get_sys() and of_clk_get(). This changes the original behavior where the struct clk is only created for once when clock driver registers the clock to CCF in the first place. The net change here is before commit 035a61c314eb the struct clk pointer is unique for given hardware clock, while after the commit the pointers returned by clk lookup calls become different for the same hardware clock. That said, the struct clk pointer comparing in the code doesn't work any more. Call helper function clk_is_match() instead to fix the problem. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> --- drivers/pwm/pwm-atmel-hlcdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)