mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
mlx4: Move DEFINE_MUTEX() outside function body.
Move static mutex declaration outside function body, to avoid global variables being declared on the stack, when using SYSINITs. MFC after: 1 week Sponsored by: NVIDIA Networking
This commit is contained in:
parent
63ad5ce733
commit
805d759338
1 changed files with 2 additions and 1 deletions
|
|
@ -1164,6 +1164,8 @@ err_sup:
|
|||
return err;
|
||||
}
|
||||
|
||||
static DEFINE_MUTEX(set_port_type_mutex);
|
||||
|
||||
static ssize_t set_port_type(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
|
|
@ -1172,7 +1174,6 @@ static ssize_t set_port_type(struct device *dev,
|
|||
port_attr);
|
||||
struct mlx4_dev *mdev = info->dev;
|
||||
enum mlx4_port_type port_type;
|
||||
static DEFINE_MUTEX(set_port_type_mutex);
|
||||
int err;
|
||||
|
||||
mutex_lock(&set_port_type_mutex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue