Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9142397pxu; Mon, 28 Dec 2020 07:39:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqrQASanEIDz7+9ppeBqewKBQP+LCmIvbtLI7Ihno3QjdPP3hn8VoKZeby1J/9qIe/JWcB X-Received: by 2002:aa7:c0c2:: with SMTP id j2mr43096388edp.343.1609169982510; Mon, 28 Dec 2020 07:39:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609169982; cv=none; d=google.com; s=arc-20160816; b=nFru+tIYenHTytZw8R16wBO/cIMK9lJ53WzFliFauzJLHwo4jUsDj8aN9FGY9Kwvwx n2Bx7gmVAoxwl6kSdqhANDrwZ/KqGXnwR8lUsC4Qnj8af6fhG4bqbkE4zAD+ACo5Rbab BgDhxBg8+cuTtwb+83b0JLzApRjUBApjiljMNFJH5bBs2d2RhgDgIufrdZxPWJeLIvXE MlkLY040lWvp5eGx2kRxXVq10/kzYa8DSCopF119+rPkywM8wBDBywmMUgW8t33iNGDI VYGwg13wmYECByXkD4KIldyJMGInrJAzFJbJhVsaZ7BM0Xv8XHwurYz5YHXxGxz7HzRQ 9Bzw== 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=1pDOu+SllhMXcumcTgZD0OGpfDETWvleLn7VaYgzdpY=; b=KE3zUg0tdkrz+YssrjAUp3WB/vIPkkXZmBCdshJwIHBuS2w8ksoyhGAqtLqmaDhUs4 jyZq9nurNn9ZgWRnWtcIW55h217kGdjhn9+NP0R30KM/ykRJy1af8Z53n6/dITFOWnQ7 X/rufyC2ZA2uICoU5Cl0b95Cr8E3040r2JtD74Wz0WUdynBhNHfUvIgT9Nq08GD7CjMb BP5GiVgKZ7uM2tqgKV7ZOCb3ZkwyrhYlajRcgIRLGtkNF7Ze0FYWDMK8IJBQtB5Grmql yhAwBSocOEf140b1nFEf7tX3flSOCy7Pf2tyIgMFgUHbrXpVzsQx9kV11URvkkrQTZXX wDYw== 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 33si20352269edr.343.2020.12.28.07.39.19; Mon, 28 Dec 2020 07:39:42 -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 S2408712AbgL1PgA (ORCPT + 99 others); Mon, 28 Dec 2020 10:36:00 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:10084 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404961AbgL1NvS (ORCPT ); Mon, 28 Dec 2020 08:51:18 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4D4JnV63rnzMBTF; Mon, 28 Dec 2020 21:49:34 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Mon, 28 Dec 2020 21:50:26 +0800 From: Zheng Yongjun To: , , , CC: Zheng Yongjun Subject: [PATCH -next] media: platform: davinci: Use DEFINE_SPINLOCK() for spinlock Date: Mon, 28 Dec 2020 21:51:04 +0800 Message-ID: <20201228135104.28566-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 spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Zheng Yongjun --- drivers/media/platform/davinci/vpif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c index 5e67994e62cc..f1ce10828b8e 100644 --- a/drivers/media/platform/davinci/vpif.c +++ b/drivers/media/platform/davinci/vpif.c @@ -41,7 +41,7 @@ MODULE_ALIAS("platform:" VPIF_DRIVER_NAME); #define VPIF_CH2_MAX_MODES 15 #define VPIF_CH3_MAX_MODES 2 -spinlock_t vpif_lock; +DEFINE_SPINLOCK(vpif_lock); EXPORT_SYMBOL_GPL(vpif_lock); void __iomem *vpif_base; @@ -437,7 +437,6 @@ static int vpif_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_get(&pdev->dev); - spin_lock_init(&vpif_lock); dev_info(&pdev->dev, "vpif probe success\n"); /* -- 2.22.0