Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753054AbbDGHqx (ORCPT ); Tue, 7 Apr 2015 03:46:53 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:38625 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753041AbbDGHqr (ORCPT ); Tue, 7 Apr 2015 03:46:47 -0400 X-AuditID: cbfee690-f796f6d000005054-87-55238b5b91f3 From: Joonyoung Shim To: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org, mturquette@linaro.org, sboyd@codeaurora.org, haojian.zhuang@gmail.com, james.hogan@imgtec.com, jy0922.shim@samsung.com Subject: [PATCH 1/2] clk: divider: don't set_rate with CLK_DIVIDER_READ_ONLY flag Date: Tue, 07 Apr 2015 16:46:45 +0900 Message-id: <1428392806-14538-1-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsWyRsSkQDe6WznUYPsNC4sL68wt3s17wWzx 4t5FFouPPfdYLS7vmsNm8XTCRTaLH2e6WRzYPS739TJ57Jx1l92jZ+cZRo871/awefRtWcXo 8XmTXABbFJdNSmpOZllqkb5dAlfGrw9zWApWs1W0vzRrYFzC2sXIySEhYCLx+fN2ZghbTOLC vfVsILaQwFJGic5rkTA1H7qeANVzAcWnM0r071/BDuH8YJQ4/ngxI0gVm4CexJ1tx5lAbBEB WYlbx36ygRQxC8xilJi7ZjHYWGGBYIknS3azgNgsAqoS89b3gtm8Au4SV7qXMEGsk5M4eWwy 2DoJgf9sEk9+nIRqEJD4NvkQkM0BlJCV2HQA6mxJiYMrbrBMYBRcwMiwilE0tSC5oDgpvchE rzgxt7g0L10vOT93EyMwfE//ezZhB+O9A9aHGAU4GJV4eBnklEOFWBPLiitzDzGaAm2YyCwl mpwPjJK8knhDYzMjC1MTU2Mjc0szJXHe11I/g4UE0hNLUrNTUwtSi+K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MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1030 Lines: 31 Even if use CLK_DIVIDER_READ_ONLY flag, divider setting can be changed by set_rate callback. Don't change divider setting from set_rate callback of divider with CLK_DIVIDER_READ_ONLY flag. Signed-off-by: Joonyoung Shim --- drivers/clk/clk-divider.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index 25006a8..ce34d29a 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -384,6 +384,9 @@ static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long flags = 0; u32 val; + if (divider->flags & CLK_DIVIDER_READ_ONLY) + return 0; + value = divider_get_val(rate, parent_rate, divider->table, divider->width, divider->flags); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/