Commit 0b0df6f2 authored by Roland Dreier's avatar Roland Dreier

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: default avatarRoland Dreier <rolandd@cisco.com>
parent 82da703e
...@@ -80,7 +80,7 @@ static int tune_pci = 0; ...@@ -80,7 +80,7 @@ static int tune_pci = 0;
module_param(tune_pci, int, 0444); module_param(tune_pci, int, 0444);
MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero"); MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero");
struct mutex mthca_device_mutex; DEFINE_MUTEX(mthca_device_mutex);
#define MTHCA_DEFAULT_NUM_QP (1 << 16) #define MTHCA_DEFAULT_NUM_QP (1 << 16)
#define MTHCA_DEFAULT_RDB_PER_QP (1 << 2) #define MTHCA_DEFAULT_RDB_PER_QP (1 << 2)
...@@ -1362,8 +1362,6 @@ static int __init mthca_init(void) ...@@ -1362,8 +1362,6 @@ static int __init mthca_init(void)
{ {
int ret; int ret;
mutex_init(&mthca_device_mutex);
mthca_validate_profile(); mthca_validate_profile();
ret = mthca_catas_init(); ret = mthca_catas_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment