From patchwork Tue Aug 10 16:31:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 118577 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7AGVQds012383 for ; Tue, 10 Aug 2010 16:31:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932335Ab0HJQbZ (ORCPT ); Tue, 10 Aug 2010 12:31:25 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:53977 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932212Ab0HJQbZ (ORCPT ); Tue, 10 Aug 2010 12:31:25 -0400 Received: by pxi10 with SMTP id 10so140537pxi.19 for ; Tue, 10 Aug 2010 09:31:24 -0700 (PDT) Received: by 10.114.107.10 with SMTP id f10mr20328507wac.113.1281457884643; Tue, 10 Aug 2010 09:31:24 -0700 (PDT) Received: from localhost (c-24-18-179-55.hsd1.wa.comcast.net [24.18.179.55]) by mx.google.com with ESMTPS id q6sm13080451waj.22.2010.08.10.09.31.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 10 Aug 2010 09:31:23 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: paul@pwsan.com, b-cousson@ti.com, p-basak2@ti.com Subject: [PATCH] OMAP: omap_hwmod: remove locking from hwmod_for_each iterators Date: Tue, 10 Aug 2010 09:31:22 -0700 Message-Id: <1281457882-30327-1-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.7.2.1 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.3 (demeter.kernel.org [140.211.167.41]); Tue, 10 Aug 2010 16:31:26 +0000 (UTC) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index cb911d7..5941d5b 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -1204,13 +1204,11 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), if (!fn) return -EINVAL; - mutex_lock(&omap_hwmod_mutex); list_for_each_entry(temp_oh, &omap_hwmod_list, node) { ret = (*fn)(temp_oh, data); if (ret) break; } - mutex_unlock(&omap_hwmod_mutex); return ret; } @@ -1703,8 +1701,6 @@ int omap_hwmod_for_each_by_class(const char *classname, pr_debug("omap_hwmod: %s: looking for modules of class %s\n", __func__, classname); - mutex_lock(&omap_hwmod_mutex); - list_for_each_entry(temp_oh, &omap_hwmod_list, node) { if (!strcmp(temp_oh->class->name, classname)) { pr_debug("omap_hwmod: %s: %s: calling callback fn\n", @@ -1715,8 +1711,6 @@ int omap_hwmod_for_each_by_class(const char *classname, } } - mutex_unlock(&omap_hwmod_mutex); - if (ret) pr_debug("omap_hwmod: %s: iterator terminated early: %d\n", __func__, ret);