From patchwork Fri Jul 4 21:04:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick X-Patchwork-Id: 4484031 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 50F3F9F26C for ; Fri, 4 Jul 2014 21:06:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F9982022D for ; Fri, 4 Jul 2014 21:06:32 +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 C8E182017D for ; Fri, 4 Jul 2014 21:06:31 +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 1X3Ael-0005nM-V9; Fri, 04 Jul 2014 21:04:31 +0000 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X3Aej-0005gN-PR for linux-arm-kernel@lists.infradead.org; Fri, 04 Jul 2014 21:04:30 +0000 Received: by mail-ie0-f173.google.com with SMTP id at20so1861700iec.4 for ; Fri, 04 Jul 2014 14:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=4VuteKwaBbiV6eGr3k2aQhlm9twdraGz4xAvRtIbbX4=; b=Z0eImnSTI60Ss0JPzds541fPeO8KM5PTMHGtal34o+pIp2xRGgrGB1UKoxJyG+pMlU u70KqC+HHD5pwRjP5ecrV5R9csNsPwCqMu4OE8qik42U+kKF5K9foaU9DZN8cveB6TQt 7ohuDosp5z6Wdc5FiVUU2LYnuep3UEVbE9+XUdjJeIUhUugOSkpXXV2+pto3YWgWCt2S eZi4lHcwjuc3X6HuW4RPfShYA1iRhWM0RjdLmU02vxgaDLI+RlThufxCGwqmk+AXvQcG YK7isSgvC4f3ozfr/xtQmiODrnR+QkITQoi1PqwfqaIYeqPlqD71mkFzjHU/tEwRN9CH p0dQ== X-Received: by 10.42.80.81 with SMTP id u17mr10702551ick.64.1404507848165; Fri, 04 Jul 2014 14:04:08 -0700 (PDT) Received: from nick-System-Product-Name.phub.net.cable.rogers.com (CPE0026f3330aca-CM0026f3330ac6.cpe.net.cable.rogers.com. [99.232.64.167]) by mx.google.com with ESMTPSA id ka6sm65380340igb.8.2014.07.04.14.04.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Jul 2014 14:04:07 -0700 (PDT) From: Nicholas Krause To: paul@pwsan.com Subject: [PATCH] mach-omap2: Change if statement in omap2_dflt_clk_enable Date: Fri, 4 Jul 2014 17:04:03 -0400 Message-Id: <1404507843-3648-1-git-send-email-xerofoify@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140704_140429_867859_61C65895 X-CRM114-Status: GOOD ( 11.07 ) X-Spam-Score: -0.8 (/) Cc: tony@atomide.com, linux-omap@vger.kernel.org, linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 This patch changes this function to check for if v is returning value from the called function. If not it does the else. Furthermore fixes the FIXME message above if statement for holding INVERT_ENABLE bit when not needing to be checked for in if statement by just checking for if v is not Null. Signed-off-by: Nicholas Krause --- arch/arm/mach-omap2/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 591581a..626363d 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -379,7 +379,7 @@ void omap2_dflt_clk_disable(struct clk_hw *hw) } v = omap2_clk_readl(clk, clk->enable_reg); - if (clk->flags & INVERT_ENABLE) + if (v) v |= (1 << clk->enable_bit); else v &= ~(1 << clk->enable_bit);