Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5811677pxu; Wed, 23 Dec 2020 06:11:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSxnz4ytIV1Zy0vAo/hkdIdR3DYFR3E7D9s6TIV3b+2gqslnCr86z+AFWpZrPTH9cWyizG X-Received: by 2002:a17:907:a96:: with SMTP id by22mr23398768ejc.171.1608732691417; Wed, 23 Dec 2020 06:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608732691; cv=none; d=google.com; s=arc-20160816; b=u8bjOVC4NhMZrSxwHPaH+ldW7FwyAzVKp2mMSpELaxxJ/frqGF0s3cGMtIrz54seK9 R6W0ydrLlw6iS8eFYA8VOcgQP3+XbIKhaYNL5GfoZOuxYC0ghBtGC0p8SRXr7wC0DSJu XgyTcZcrgjYqc2yiFrx5ekheT402c/MXrPXSYRJMOcOJZkn9K7Xrqfd3YpKd3mLOkfa+ h/ACahjA9SKDNrc74EzTWZabGF2cJQe7I3joYGzIR6i3w5XwiNnGFRKQHM8unLqWpEnX L63oX3xFKsc1eVnXnShwLR2Rp1Pd4xUlEUT22zn7JnEuhg7mdnYro2UF1bkxRGt9XYYF KLXw== 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=G339ilLS1FY8GmuN8YT2oeaWBCEJF3cbhT+6/P+hgqw=; b=J1w1G+PdpVjFfxnJV9SJRZ2bOVoM7wvlxwR5nodWAhdFzrMpggjGXYfZdVIGPAqzvO 9SzRjd1xwwkQtCA4kVNTBATZYW55aFDADZlxxq0No9DZaj4yEWCboKBTvc9Zca5TDjhr PjWVjuIzPg0ImelLHlw2k1GrBNOqK+SAo6kZ37VivqIOUWHoQ4+1HKH4H4FDN88STL/A wqz0+zgD1oYq6bVjxiRMTzFgCH2/fmx2XOwERPyVeRJCRfZzZ1z23Us7O/VksCSaKEin uJSbW2iwWNwJYtRZjfY828EGkEhkiFOmdKhWzqhKhYr17XO4YksZ5vhMgXCbza7wvUUF bwWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 a89si8876828edf.215.2020.12.23.06.11.08; Wed, 23 Dec 2020 06:11:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728755AbgLWOLA (ORCPT + 99 others); Wed, 23 Dec 2020 09:11:00 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9637 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728449AbgLWOLA (ORCPT ); Wed, 23 Dec 2020 09:11:00 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4D1FSj52hsz15hr7; Wed, 23 Dec 2020 22:09:25 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Wed, 23 Dec 2020 22:09:58 +0800 From: Zheng Yongjun To: , , , , , , CC: Zheng Yongjun Subject: [PATCH -next] video: backlight: use DEFINE_MUTEX (and mutex_init() had been too late) Date: Wed, 23 Dec 2020 22:10:35 +0800 Message-ID: <20201223141035.32178-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-kernel@vger.kernel.org Signed-off-by: Zheng Yongjun --- drivers/video/backlight/backlight.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 537fe1b376ad..d7a09c422547 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -64,7 +64,7 @@ */ static struct list_head backlight_dev_list; -static struct mutex backlight_dev_list_mutex; +static DEFINE_MUTEX(backlight_dev_list_mutex); static struct blocking_notifier_head backlight_notifier; static const char *const backlight_types[] = { @@ -757,7 +757,6 @@ static int __init backlight_class_init(void) backlight_class->dev_groups = bl_device_groups; backlight_class->pm = &backlight_class_dev_pm_ops; INIT_LIST_HEAD(&backlight_dev_list); - mutex_init(&backlight_dev_list_mutex); BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier); return 0; -- 2.22.0