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: 6411571 Return-Path: X-Original-To: patchwork-linux-arm@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 C71A99F6E5 for ; Fri, 15 May 2015 06:28:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04E102038E for ; Fri, 15 May 2015 06:28:01 +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 322B42038C for ; Fri, 15 May 2015 06:28:00 +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 1Yt93k-0002uj-NC; Fri, 15 May 2015 06:25:24 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yt93d-0001iW-Cc for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2015 06:25:18 +0000 Received: by pacwv17 with SMTP id wv17so4368678pac.2 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=evcqhZTWifsEVOjRt4Qw/minOMMdZ0lqL2F+U9dZ6wiSxWxLzPvz9/zzBFchS7iLnA Wk9PkwipmKmO/+VWCZ5ETSnYqWhZj7qDwF8+KfBWUGQv7UiVLp52adia25cjg6YvCGwF 6Z05iaPYH9Udw+E4YmRxCkr11108JHtAVapwHIl+6BzPjRABrG+R4q4H26UuKppPKpdY Z1WVna2mz7W5pNwBCtatfAxGlMHBUVOsy7RRkfVxRYoaXhBc9KEuW+o7cij4c3kV5jSF MTkAHnGpoebEf1p9xeJnQOLVq8CerFdlPiSBBSs4p0A/+BHyV0Wb/AaDFzXTBaZEkMzl vPPA== X-Gm-Message-State: ALoCoQlv34oIvGIDO91+lNtcSbcTJA7+j4wz1tpK41TIGrGb+Rs16uP4tAqW6S/CdrGX2bxRGRkS 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_479337_BB9DE40F X-CRM114-Status: UNSURE ( 8.54 ) 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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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=unavailable 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);