From patchwork Fri May 15 06:22:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricky Liang X-Patchwork-Id: 6411551 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 66C899F6E5 for ; Fri, 15 May 2015 06:25:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BA012038C for ; Fri, 15 May 2015 06:25:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C20D220383 for ; Fri, 15 May 2015 06:25:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yt93g-0002uW-OF; Fri, 15 May 2015 06:25:20 +0000 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yt93d-0001iY-C7 for linux-mediatek@lists.infradead.org; Fri, 15 May 2015 06:25:18 +0000 Received: by pdfh10 with SMTP id h10so4454677pdf.3 for ; Thu, 14 May 2015 23:24:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=M+uYZHNFcgvXpmFWBTcWftCcQ2AmQS1U9K3gDhoavMg=; b=bwAgxEHFdg36ihYh22hPVro9Kro/YIMGdj9JF/CNs6220elp0niFliTmYPjUuF6rMb F/zAfCOBFj54Smu5lit4OKzdVqnNIAOAbciwQjLBJr0nL5a6wjLjaWoZjbegRy19OwjF lF4zCIRkni2eFigA5hfSeRSrZbVlByuZ09dBg= 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; bh=M+uYZHNFcgvXpmFWBTcWftCcQ2AmQS1U9K3gDhoavMg=; b=Dop6IqCnP0gbWm29qBm7YO8EMKWlNowc779q3QE5ObsUvBWfue03WpTP7OVMT0EUc7 MXo1TEnMg4XlCKEgOYdyyrLBlVNKcXGN3hp5OSc+VD1jvV77EOqEa9Px6yhBlwUKABZy 2czQ4iNMi9bpYOMlFqM1c14XTsonV+xWlq2l/zJSS4jhiJ1V4cz4HYrwpb/B1PtgrFiB DDgeH8ZTDhJVR9CoOR9mHgwMhMl2XL9Z8k5TW112QtqtKyjDq+qmS2TeLV9ZflDDpS/C u48W8Y+rriTgbDT+t0eouvijf88sJfGG3CHuyjV64A262XeESFIzINVHIOIgZB+Uh/O0 APzw== X-Gm-Message-State: ALoCoQl0Q+csgE+3erWKkZl2sPat7B0wiXPGAYSJQxQQ82a7ndaoS3MkFcCymjvoWqc58qjpLt2S X-Received: by 10.66.232.104 with SMTP id tn8mr15121964pac.73.1431671093599; Thu, 14 May 2015 23:24:53 -0700 (PDT) Received: from jcliang-z620.tpe.corp.google.com ([172.30.210.189]) by mx.google.com with ESMTPSA id b10sm693436pdj.0.2015.05.14.23.24.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 23:24:52 -0700 (PDT) From: Ricky Liang To: Mike Turquette , Stephen Boyd Subject: [PATCH] clk: mediatek: Initialize clk flags Date: Fri, 15 May 2015 14:22:45 +0800 Message-Id: <1431670969-1996-1-git-send-email-jcliang@chromium.org> X-Mailer: git-send-email 2.1.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150514_232517_481620_91924F95 X-CRM114-Status: UNSURE ( 6.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: James Liao , Sascha Hauer , open list , Henry Chen , Ricky Liang , "moderated list:ARM/Mediatek SoC..." , Matthias Brugger , "open list:COMMON CLK FRAMEWORK" , "moderated list:ARM/Mediatek SoC..." X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The variable init (struct clk_init_data) is allocated on the stack. We weren't initializing the .flags field, so it contains random junk, which can cause all kinds of interesting issues when the flags are parsed by clk_register. The best solution seems to just pass on the flags passed in to our clk_register wrappers. Signed-off-by: Ricky Liang --- drivers/clk/mediatek/clk-pll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c index 66154ca..72fe307 100644 --- a/drivers/clk/mediatek/clk-pll.c +++ b/drivers/clk/mediatek/clk-pll.c @@ -289,6 +289,7 @@ static struct clk *mtk_clk_register_pll(const struct mtk_pll_data *data, init.ops = &mtk_pll_ops; init.parent_names = &parent_name; init.num_parents = 1; + init.flags = data->flags; clk = clk_register(NULL, &pll->hw);