Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759900AbYACF4T (ORCPT ); Thu, 3 Jan 2008 00:56:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754357AbYACF4M (ORCPT ); Thu, 3 Jan 2008 00:56:12 -0500 Received: from fg-out-1718.google.com ([72.14.220.154]:49004 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbYACF4L (ORCPT ); Thu, 3 Jan 2008 00:56:11 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent; b=TKovs3iVGa9ufp7e6RsBQ7vqQDPSrBkEUl0wVfJEpZZeJ3ZmGjln+WeSo9K64ic4zUZs3oKROMtWIjVBzyslL73CGtmE6BBwTvo5x0Tqaf2QFdeOUvj0uV0s2tCoBl9BrpbwPRmIRzRh3ejBUwE+4hz3w5EObTdK5eoa4H7GZyg= Date: Thu, 3 Jan 2008 13:59:45 +0800 From: Dave Young To: a.zummo@towertech.it Cc: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: [PATCH 5/7] rtc : convert semaphore to mutex in struct class Message-ID: <20080103055945.GF4885@darkstar.te-china.tietoenator.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1133 Lines: 33 Use mutex instead of semaphore in struct class. Signed-off-by: Dave Young --- drivers/rtc/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -upr linux/drivers/rtc/interface.c linux.new/drivers/rtc/interface.c --- linux/drivers/rtc/interface.c 2007-12-28 10:41:42.000000000 +0800 +++ linux.new/drivers/rtc/interface.c 2007-12-28 10:43:51.000000000 +0800 @@ -256,7 +256,7 @@ struct rtc_device *rtc_class_open(char * struct device *dev; struct rtc_device *rtc = NULL; - down(&rtc_class->sem); + mutex_lock(&rtc_class->mutex); list_for_each_entry(dev, &rtc_class->devices, node) { if (strncmp(dev->bus_id, name, BUS_ID_SIZE) == 0) { dev = get_device(dev); @@ -272,7 +272,7 @@ struct rtc_device *rtc_class_open(char * rtc = NULL; } } - up(&rtc_class->sem); + mutex_unlock(&rtc_class->mutex); return rtc; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/