From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC720C433E1 for ; Sat, 27 Mar 2021 09:54:11 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4192D61A0A for ; Sat, 27 Mar 2021 09:54:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4192D61A0A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=vLcehAIselUbubhqWbmldDkuzwp2f9LherNt0m2mCF8=; b=NMjatBBSQUFwbBUT1qhPkMv2p/ RGk2XWYJP9a3/mhEcoyrogXK6Dgov+MhS9YisESl8UeKfVNjRoqevKFhngYKOINc6Qc0fIAtrIg8o PRFGK4ElX8ekLgO3xxAtPuI0S2ZobMkN5NRHbKlYLD4zAtrQXHGq8ouUEFBb6srxfBS+JXg2ffkSk x9ZFuiU+3JJIVmXURxcBCdLTsGPyQld2zZnFMg2fjpuQxkYuaFLpLWrPxnDtv0M0JOAeop484jkfz OVWzBS5CyNw3NRdtlQWrtaWQ8GoeOGV2RGpEtM7LXmVW2KJK2k+ZLctqqZnd/CmNNxD82ZRVJcqdA vF/hah6Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQ5ce-004yMP-Nq; Sat, 27 Mar 2021 09:52:48 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQ5cZ-004yL8-PT for linux-arm-kernel@lists.infradead.org; Sat, 27 Mar 2021 09:52:46 +0000 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F6vG61mvszPvLw; Sat, 27 Mar 2021 17:50:06 +0800 (CST) Received: from huawei.com (10.67.174.78) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Sat, 27 Mar 2021 17:52:32 +0800 From: Chen Lifu To: , Russell King CC: , , , , , , Subject: [PATCH -next] i2c: gpio: use DEFINE_SPINLOCK() for spinlock Date: Sat, 27 Mar 2021 17:52:28 +0800 Message-ID: <20210327095228.105123-1-chenlifu@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.78] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210327_095244_408073_B9CB01ED X-CRM114-Status: UNSURE ( 7.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lifu Chen spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Lifu Chen --- arch/arm/mach-sa1100/simpad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index c7fb9a73e4c5..c183432880d3 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c @@ -45,7 +45,7 @@ */ static long cs3_shadow; -static spinlock_t cs3_lock; +static DEFINE_SPINLOCK(cs3_lock); static struct gpio_chip cs3_gpio; long simpad_get_cs3_ro(void) @@ -379,8 +379,6 @@ static int __init simpad_init(void) { int ret; - spin_lock_init(&cs3_lock); - cs3_gpio.label = "simpad_cs3"; cs3_gpio.base = SIMPAD_CS3_GPIO_BASE; cs3_gpio.ngpio = 24; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel