Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5813826pxu; Wed, 23 Dec 2020 06:14:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI6wEqtr9n4+PmtCFR3mwIgp2jTtg7wM0T2xJh5bzBSn6YJ1yQmnzYlQc/o5JZlwW8ynNE X-Received: by 2002:a17:907:a8a:: with SMTP id by10mr23904027ejc.423.1608732850278; Wed, 23 Dec 2020 06:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608732850; cv=none; d=google.com; s=arc-20160816; b=sKa/eQAdRzUTgMuLotdI4HndHO9ax+H0UCbss6wLfBNznWQD8dRQHXmLEJjXgBS3At s7IPLwaSdDdxtDBECvAEdD8JENp69QU+h+06GNs173eVJuRKdRopx8vFwuY2UvvItuhg gPliuwnhCo/QxSmts4SFwE7THpgc3BcOJqMJTtWML+SeuyYElDq88V89/fR8glR/yuMT SzQY1Z4a6Yd2w1A8xF44Qs5lMAfpu4xFMb56PfoC7mr5cW1HiuGlBW1Hb2PvAQV8BGE1 ZnTJGRnPGLvGiupw4uRVBD1eDFv+095donVRpOJ42g9hNIdW8sBQJQgAJC9IcQLRSdFC DxYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=dnY4O4I2kgtx0rap8mXwRP8nHzRdLDL72RQNOCiU+UM=; b=gtcP3ywBOLjojE5QDVmNVajzjnhgBo2cpRv6AWjRn6FZHqsjR1D7lI5baiJDofPsmL FF+9W1kJne1SVWO5LN+Y85c5hhqT4SL6b1stcnTQC7InfFh3BRMV1WLJhdK1wDpUW/oO 22OnDliRCA+N9qK/XiLWg+cvCywPTkTSxNqbLvvsuwMADzVYfm/2jkXxp64Ww+K3akcH zM5TdpfXDTECaJDneX8jx6anO9RQHD+/NIiCnEgBj+itMgRHEt2dTgfS32ZURE5Mz9yX /59PoJ320Fr1eQIjjz0RohsjFijOERD9smxBeY06Rya1fWBOfCWJXs7oCjjArCXRlSp4 5qDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si11980895eji.212.2020.12.23.06.13.46; Wed, 23 Dec 2020 06:14:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728943AbgLWOMW (ORCPT + 99 others); Wed, 23 Dec 2020 09:12:22 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9638 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728742AbgLWOMW (ORCPT ); Wed, 23 Dec 2020 09:12:22 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4D1FV91hfrz15hRG; Wed, 23 Dec 2020 22:10:41 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Wed, 23 Dec 2020 22:11:16 +0800 From: Zheng Yongjun To: , , , , , CC: Zheng Yongjun Subject: [PATCH -next] intel/iwlwifi: use DEFINE_MUTEX (and mutex_init() had been too late) Date: Wed, 23 Dec 2020 22:11:52 +0800 Message-ID: <20201223141152.32564-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.138.68] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Zheng Yongjun --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 9dcd2e990c9c..71119044382f 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -133,7 +133,7 @@ enum { }; /* Protects the table contents, i.e. the ops pointer & drv list */ -static struct mutex iwlwifi_opmode_table_mtx; +static DEFINE_MUTEX(iwlwifi_opmode_table_mtx); static struct iwlwifi_opmode_table { const char *name; /* name: iwldvm, iwlmvm, etc */ const struct iwl_op_mode_ops *ops; /* pointer to op_mode ops */ @@ -1786,8 +1786,6 @@ static int __init iwl_drv_init(void) { int i, err; - mutex_init(&iwlwifi_opmode_table_mtx); - for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++) INIT_LIST_HEAD(&iwlwifi_opmode_table[i].drv); -- 2.22.0