From patchwork Wed Mar 2 15:57:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 603141 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p22FuJj1010245 for ; Wed, 2 Mar 2011 15:56:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754665Ab1CBP4S (ORCPT ); Wed, 2 Mar 2011 10:56:18 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:59934 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754327Ab1CBP4S (ORCPT ); Wed, 2 Mar 2011 10:56:18 -0500 Received: by mail-ey0-f174.google.com with SMTP id 24so22036eyx.19 for ; Wed, 02 Mar 2011 07:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=q3Sm5AcbU0wNgREBTS/KMq+kx4eIY7Cv/+3fmIfGC+Y=; b=VQ5+iQqdSj4QNt9s47psI0NHns6qvkR6Mp/Uty8+uh0xmMdzSJWqz9UAaEfl9gYMqw wa6WxRKD5WDnhkZPTIIN1p8e+bfDF1Cna7imiEl2OzU7N2KTgJHSpiD9sEtvqHljakB2 A5cYT05dPAojM8KgM0Mk9vTERf3bPR2vCS09A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=cDSM+NUq6NPMMbzOqNpvIa/qy+oElQQXmDfxXsrm6IwzXnWuuv1xx0AAYgJNJ5ieXT nSr5wL0VIaLmm617KzWo2ljc1DBQC4XEuvAHerTP0/yRFNx10mab8TucxWlHyFOEhZXV MGcO09TINV7U7UZ9rc4oE9KYa5ZRNgIvu33po= Received: by 10.213.16.140 with SMTP id o12mr307455eba.0.1299081377178; Wed, 02 Mar 2011 07:56:17 -0800 (PST) Received: from localhost ([194.136.136.46]) by mx.google.com with ESMTPS id t5sm76630eeh.8.2011.03.02.07.56.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Mar 2011 07:56:16 -0800 (PST) From: Jarkko Nikula To: linux-omap@vger.kernel.org Cc: Thara Gopinath , Nishanth Menon , Jarkko Nikula Subject: [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls Date: Wed, 2 Mar 2011 17:57:23 +0200 Message-Id: <1299081445-27938-2-git-send-email-jhnikula@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1299081445-27938-1-git-send-email-jhnikula@gmail.com> References: <1299081445-27938-1-git-send-email-jhnikula@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 02 Mar 2011 15:56:19 +0000 (UTC) diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 95ac336..d94894a 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -213,6 +213,9 @@ static void sr_set_regfields(struct omap_sr *sr) static void sr_start_vddautocomp(struct omap_sr *sr) { + if (sr->autocomp_active) + return; + if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) { dev_warn(&sr->pdev->dev, "%s: smartreflex class driver not registered\n",