From patchwork Sun Aug 30 08:50:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Holtmann X-Patchwork-Id: 32570 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 6F87CB7334 for ; Sun, 30 Aug 2009 18:53:35 +1000 (EST) Received: by ozlabs.org (Postfix) id 622D0DDDB2; Sun, 30 Aug 2009 18:53:35 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id D996ADDD0C for ; Sun, 30 Aug 2009 18:53:34 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210AbZH3Iwa (ORCPT ); Sun, 30 Aug 2009 04:52:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753214AbZH3Iw3 (ORCPT ); Sun, 30 Aug 2009 04:52:29 -0400 Received: from senator.holtmann.net ([87.106.208.187]:53306 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753106AbZH3IwT (ORCPT ); Sun, 30 Aug 2009 04:52:19 -0400 Received: from localhost.localdomain (S0106001cf062885c.vc.shawcable.net [24.82.138.234]) by mail.holtmann.org (Postfix) with ESMTP id 89AB68B812; Sun, 30 Aug 2009 10:52:20 +0200 (CEST) From: Marcel Holtmann To: "David S. Miller" Cc: netdev@vger.kernel.org Subject: [PATCH 24/47] Bluetooth: Convert hdev->req_lock to a mutex Date: Sun, 30 Aug 2009 01:50:38 -0700 Message-Id: X-Mailer: git-send-email 1.6.2.5 In-Reply-To: <5959809ded86e267c1a95fb44738a224c30d3434.1251621661.git.marcel@holtmann.org> References: <981b1414d78a7a42cab48b97d4de54a62d61db88.1251621661.git.marcel@holtmann.org> <290ba200815fdecb4d40dc942499c4ea6d0c4624.1251621661.git.marcel@holtmann.org> <364f63519d94442ed373ac7da79033c8282df46a.1251621661.git.marcel@holtmann.org> <9eba32b86d17ef87131fa0bce43c614904ab5781.1251621661.git.marcel@holtmann.org> <132ff4e5fa8dfb71a7d99902f88043113947e972.1251621661.git.marcel@holtmann.org> <789221ecc870117b77e354d488d5d29f15410de8.1251621661.git.marcel@holtmann.org> <196be0cd018068d545e1d764094c7b07aaf0bcfe.1251621661.git.marcel@holtmann.org> <08b0b0ce8c609b0e2284b134f0614e211374a038.1251621661.git.marcel@holtmann.org> <944fe798c6a48336e82bbc0d4e280587325a4d95.1251621661.git.marcel@holtmann.org> <542399037d0cb2b2e96dfb8ced35b07dfb1c3706.1251621661.git.marcel@holtmann.org> <4271e08d8b799171af18d7864908ec444282efe5.1251621661.git.marcel@holtmann.org> <9666fb356da78a5ec28403197d72e8cd6aa16424.1251621661.git.marcel@holtmann.org> <60dee5ccd789ee8a380eee802b6cb24c52123428.1251621661.git.marcel@holtmann.org> <91d697302b291205171840bfe84c1563e171acb2.1251621661.git.marcel@holtmann.org> <9374253ffe609f2d70dd5ae280182cb6f08fef08.1251621661.git.marcel@holtmann.org> <3318b2362bf0528be77123c480249663557dfbfc.1251621661.git.marcel@holtmann.org> <5959809ded86e267c1a95fb44738a224c30d3434.1251621661.git.marcel@holtmann.org> In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Thomas Gleixner hdev->req_lock is used as mutex so make it a mutex. Signed-off-by: Thomas Gleixner Signed-off-by: Marcel Holtmann --- include/net/bluetooth/hci_core.h | 6 +++--- net/bluetooth/hci_core.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 25b8a03..7b640ae 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -117,7 +117,7 @@ struct hci_dev { struct sk_buff *sent_cmd; struct sk_buff *reassembly[3]; - struct semaphore req_lock; + struct mutex req_lock; wait_queue_head_t req_wait_q; __u32 req_status; __u32 req_result; @@ -704,8 +704,8 @@ struct hci_sec_filter { #define HCI_REQ_PEND 1 #define HCI_REQ_CANCELED 2 -#define hci_req_lock(d) down(&d->req_lock) -#define hci_req_unlock(d) up(&d->req_lock) +#define hci_req_lock(d) mutex_lock(&d->req_lock) +#define hci_req_unlock(d) mutex_unlock(&d->req_lock) void hci_req_complete(struct hci_dev *hdev, int result); diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 406ad07..e1da8f6 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -911,7 +911,7 @@ int hci_register_dev(struct hci_dev *hdev) hdev->reassembly[i] = NULL; init_waitqueue_head(&hdev->req_wait_q); - init_MUTEX(&hdev->req_lock); + mutex_init(&hdev->req_lock); inquiry_cache_init(hdev);