From patchwork Sat Apr 28 09:16:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 10370179 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 E2784602DC for ; Sat, 28 Apr 2018 09:25:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFA6F29289 for ; Sat, 28 Apr 2018 09:25:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D453D292A5; Sat, 28 Apr 2018 09:25:08 +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=-6.4 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F6D629289 for ; Sat, 28 Apr 2018 09:25:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759760AbeD1JZH (ORCPT ); Sat, 28 Apr 2018 05:25:07 -0400 Received: from lucky1.263xmail.com ([211.157.147.132]:57526 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759752AbeD1JZD (ORCPT ); Sat, 28 Apr 2018 05:25:03 -0400 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.152]) by lucky1.263xmail.com (Postfix) with ESMTP id 854BA68CC8; Sat, 28 Apr 2018 17:25:00 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 7C7503B5; Sat, 28 Apr 2018 17:24:53 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: mturquette@baylibre.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <7a94983efdd5762d22800fb9a5ff6556> X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from unknown (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith SMTP id 16076H2T86O; Sat, 28 Apr 2018 17:24:54 +0800 (CST) From: Shawn Lin To: Michael Turquette , Stephen Boyd Cc: Heiko Stuebner , linux-clk@vger.kernel.org, Elaine Zhang , Shawn Lin Subject: [PATCH 2/2] clk: clk-conf: Convert to use clk_set_rate_safe() Date: Sat, 28 Apr 2018 17:16:58 +0800 Message-Id: <1524907018-195819-2-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1524907018-195819-1-git-send-email-shawn.lin@rock-chips.com> References: <1524907018-195819-1-git-send-email-shawn.lin@rock-chips.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If assigning clock rate from firmware, make sure any assignment is safety for the its children. Signed-off-by: Shawn Lin --- drivers/clk/clk-conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c index 49819b5..2dd0305 100644 --- a/drivers/clk/clk-conf.c +++ b/drivers/clk/clk-conf.c @@ -107,7 +107,7 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier) return PTR_ERR(clk); } - rc = clk_set_rate(clk, rate); + rc = clk_set_rate_safe(clk, rate); if (rc < 0) pr_err("clk: couldn't set %s clk rate to %u (%d), current rate: %lu\n", __clk_get_name(clk), rate, rc,