diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-12-15 23:55:28 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-12-15 23:55:28 -0500 |
commit | 0b0df6f2079e731c44226a0673b07a166509a5de (patch) | |
tree | 2ed1fc00c793b45fbb9c67afd6359efb202b3e99 /drivers/infiniband/hw/mthca/mthca_main.c | |
parent | 82da703ee685b69b921b20eb76b50e519ca9956c (diff) |
IB/mthca: Use DEFINE_MUTEX() instead of mutex_init()
mthca_device_mutex() can be initialized automatically with
DEFINE_MUTEX() rather than explicitly calling mutex_init(). This
saves a bit of text and shrinks the source by a line, so we may as
well do it....
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_main.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 711c1b845f3f..44bc6cc734ab 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -80,7 +80,7 @@ static int tune_pci = 0; | |||
80 | module_param(tune_pci, int, 0444); | 80 | module_param(tune_pci, int, 0444); |
81 | MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero"); | 81 | MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero"); |
82 | 82 | ||
83 | struct mutex mthca_device_mutex; | 83 | DEFINE_MUTEX(mthca_device_mutex); |
84 | 84 | ||
85 | #define MTHCA_DEFAULT_NUM_QP (1 << 16) | 85 | #define MTHCA_DEFAULT_NUM_QP (1 << 16) |
86 | #define MTHCA_DEFAULT_RDB_PER_QP (1 << 2) | 86 | #define MTHCA_DEFAULT_RDB_PER_QP (1 << 2) |
@@ -1362,8 +1362,6 @@ static int __init mthca_init(void) | |||
1362 | { | 1362 | { |
1363 | int ret; | 1363 | int ret; |
1364 | 1364 | ||
1365 | mutex_init(&mthca_device_mutex); | ||
1366 | |||
1367 | mthca_validate_profile(); | 1365 | mthca_validate_profile(); |
1368 | 1366 | ||
1369 | ret = mthca_catas_init(); | 1367 | ret = mthca_catas_init(); |