projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a052517
)
qed: Use DEFINE_SPINLOCK() for spinlock
author
Wei Yongjun
<
[email protected]
>
Tue, 2 Aug 2016 13:49:00 +0000
(13:49 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 8 Aug 2016 23:05:16 +0000
(16:05 -0700)
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Wei Yongjun <
[email protected]
>
Acked-by: Yuval Mintz <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/qlogic/qed/qed_dev.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/qlogic/qed/qed_dev.c
b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 0e4f4a9306b55ac64173a7a1ce73ad0626e5a143..b8d594a95a6542c2241867305c4d66946ed35bd5 100644
(file)
--- a/
drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/
drivers/net/ethernet/qlogic/qed/qed_dev.c
@@
-35,8
+35,7
@@
#include "qed_sriov.h"
#include "qed_vf.h"
-static spinlock_t qm_lock;
-static bool qm_lock_init = false;
+static DEFINE_SPINLOCK(qm_lock);
/* API common to all protocols */
enum BAR_ID {
@@
-1004,11
+1003,6
@@
int qed_hw_init(struct qed_dev *cdev,
p_hwfn->first_on_engine = (load_code ==
FW_MSG_CODE_DRV_LOAD_ENGINE);
- if (!qm_lock_init) {
- spin_lock_init(&qm_lock);
- qm_lock_init = true;
- }
-
switch (load_code) {
case FW_MSG_CODE_DRV_LOAD_ENGINE:
rc = qed_hw_init_common(p_hwfn, p_hwfn->p_main_ptt,