From patchwork Mon Feb 10 20:26:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 24414 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A4AA220143 for ; Mon, 10 Feb 2014 20:28:13 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id oz11sf17105835veb.4 for ; Mon, 10 Feb 2014 12:28:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=FCn8XphiSR0OFP1R85FxMyrzODWdjvy+hyrQaaAorXw=; b=Iwq1seJ+PaEFId/Cx9ewqBrarkGxNsz4hAR5L6AT5t6F9WNPdkk7CEmlv+nsMqG7CY R6lJMf0O4H6QNLOdnEXfIaXd+jjF3ZZtvVUq8jo6eBXM0ks9Q5uhsNVBiezMoAysq1OV +T3QEJzqZ1mleAN4xkm4xexwgeA1nAZJ4ADfouzslPKYI/u9u6f9M2HLVRbVqm8eUW1i DQaFfoq1vyaNlghERqyMXusVLA/XF8xkmkf2j4rnfNL29qTATfzzbN+wDseUfY50cxzD TPrcKOJA5OIis7/G0he8GcWOflPmMwKSUSveJ+ufoDJgUpF/3gKdpQHqwKu+2k/AFl7W fvzQ== X-Gm-Message-State: ALoCoQkIwYFq4oBkEvFkrHkKySqY4hXgPsNMYHKNome3xMMoBAce+S5naKfCC7T3Fp1+YUHhsSfw X-Received: by 10.236.94.113 with SMTP id m77mr10783497yhf.33.1392064092654; Mon, 10 Feb 2014 12:28:12 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.46.98 with SMTP id j89ls2210235qga.73.gmail; Mon, 10 Feb 2014 12:28:12 -0800 (PST) X-Received: by 10.58.211.130 with SMTP id nc2mr24534633vec.7.1392064092545; Mon, 10 Feb 2014 12:28:12 -0800 (PST) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id dq2si2728577veb.69.2014.02.10.12.28.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 12:28:12 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if11so5086464vcb.8 for ; Mon, 10 Feb 2014 12:28:12 -0800 (PST) X-Received: by 10.52.189.33 with SMTP id gf1mr3034643vdc.26.1392064092449; Mon, 10 Feb 2014 12:28:12 -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.220.174.196 with SMTP id u4csp195527vcz; Mon, 10 Feb 2014 12:28:11 -0800 (PST) X-Received: by 10.68.244.103 with SMTP id xf7mr39728630pbc.50.1392064091238; Mon, 10 Feb 2014 12:28:11 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si16511040pbh.220.2014.02.10.12.28.10; Mon, 10 Feb 2014 12:28:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754972AbaBJU1n (ORCPT + 27 others); Mon, 10 Feb 2014 15:27:43 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:49982 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753570AbaBJU13 (ORCPT ); Mon, 10 Feb 2014 15:27:29 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1AKR4K8002928; Mon, 10 Feb 2014 14:27:04 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1AKR3aa030091; Mon, 10 Feb 2014 14:27:03 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Mon, 10 Feb 2014 14:27:03 -0600 Received: from ula0393909.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1AKR1hB002023; Mon, 10 Feb 2014 14:27:03 -0600 From: Santosh Shilimkar To: CC: , , , Santosh Shilimkar Subject: [PATCH 1/2] clk: keystone: gate: fix clk_init_data initialization Date: Mon, 10 Feb 2014 15:26:50 -0500 Message-ID: <1392064011-11986-2-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392064011-11986-1-git-send-email-santosh.shilimkar@ti.com> References: <1392064011-11986-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: santosh.shilimkar@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , List-Help: , List-Archive: List-Unsubscribe: , From: Ivan Khoronzhuk The clk_init_data struct is allocated in the stack. All members of this struct should be initialized before using otherwise it will lead to unpredictable situation as it can contain garbage. Ultimately the clk->flag field contains garbage. In my case it leads that flag CLK_IGNORE_UNUSED is set for most of clocks. As result a bunch of unused clocks cannot be disabled. So initialize flags in this structure too. Cc: Mike Turquette Signed-off-by: Ivan Khoronzhuk Signed-off-by: Santosh Shilimkar --- drivers/clk/keystone/gate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/keystone/gate.c b/drivers/clk/keystone/gate.c index 17a5983..86f1e36 100644 --- a/drivers/clk/keystone/gate.c +++ b/drivers/clk/keystone/gate.c @@ -179,6 +179,7 @@ static struct clk *clk_register_psc(struct device *dev, init.name = name; init.ops = &clk_psc_ops; + init.flags = 0; init.parent_names = (parent_name ? &parent_name : NULL); init.num_parents = (parent_name ? 1 : 0);