Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3111621pxb; Tue, 19 Jan 2021 14:13:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvhPeAl5ZrbOXRbI3O3uo03tKeB8MoJGzG8xfFJoDdpdWS9lRw7CDKigTqB1vUKmL1Htg9 X-Received: by 2002:a17:906:da02:: with SMTP id fi2mr4099252ejb.230.1611094415091; Tue, 19 Jan 2021 14:13:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611094415; cv=none; d=google.com; s=arc-20160816; b=ytrkPk1f+yXI1lQeBWy6789U0fFpsVwNlWKHfyOZjRn6yK6j9rK6ojCAo5s1nqtiMN Y1GCFc31XO+6VYRMxjY5GFzFb9wvDlGUxNAVPd+MrZHHJfW9TVhoHCAr0UDh4Tw36UrN RzT7SFbQ2C/DkAP+9+JuYByLq9XRykk/CAGwZiIsADuF3XVy7KBCZfjLLKUf4xr7gYVZ YpJrRHjn2KxGNIgxMf7eYwf+C9Xduqsn3+1u4MsCYl64ph0pfrioKWrcHDrfO2tzADNk nSLRbMV2+lNkd0vuctmvPM8Ap8Qk0AK0ZdoJ1sTsfu+J6zWhmkfM3dK5JZtHNI91hiV6 UGrw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZpMQb2P3esz6LnVKhML00t5B0LYtClKw1RppRkLPo6E=; b=aK94PG9z5iqZFOmkMYZhhfPpQ6FsQPYcwybb7vTMuEEvRgHe0F5vv/K4ekMb05Nbp5 egoFeqB5IA3Zz3oPdl1CAG6Bu7vdnPUG+VoXm1YVxWmD88R6GAbra6gmSLTCOCwvTXiu 1GTfqkQOWa79q1pbXqwSuWPP/4JCIR665d79nFFp9btCU74aGe3soQgxJ25MFCnztjVy SY2hT9dah/24Cjje3BIKA6PLitdmdO/1r+41tvA8/vVtXlkOufhAv/4V8UGyp16qMSyY FjX2xkdqwz0GqaSMyKqcHzhPWqxsGtfCZ+1qn0k3CQduveedVkvuQiulXQwLdUkXujpp AcPQ== 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 w17si43001ejb.66.2021.01.19.14.13.04; Tue, 19 Jan 2021 14:13:35 -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 S1731022AbhASWKx (ORCPT + 99 others); Tue, 19 Jan 2021 17:10:53 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48775 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729502AbhASWIN (ORCPT ); Tue, 19 Jan 2021 17:08:13 -0500 X-Originating-IP: 86.202.109.140 Received: from localhost (lfbn-lyo-1-13-140.w86-202.abo.wanadoo.fr [86.202.109.140]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 4ECF6E0002; Tue, 19 Jan 2021 22:07:06 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/14] rtc: rx8025: use rtc_lock/rtc_unlock Date: Tue, 19 Jan 2021 23:06:51 +0100 Message-Id: <20210119220653.677750-13-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210119220653.677750-1-alexandre.belloni@bootlin.com> References: <20210119220653.677750-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid accessing directly rtc->ops_lock and use the RTC core helpers. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rx8025.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index a24f85893f90..c914091819ba 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c @@ -142,10 +142,9 @@ static irqreturn_t rx8025_handle_irq(int irq, void *dev_id) { struct i2c_client *client = dev_id; struct rx8025_data *rx8025 = i2c_get_clientdata(client); - struct mutex *lock = &rx8025->rtc->ops_lock; int status; - mutex_lock(lock); + rtc_lock(rx8025->rtc); status = rx8025_read_reg(client, RX8025_REG_CTRL2); if (status < 0) goto out; @@ -170,7 +169,7 @@ static irqreturn_t rx8025_handle_irq(int irq, void *dev_id) } out: - mutex_unlock(lock); + rtc_unlock(rx8025->rtc); return IRQ_HANDLED; } -- 2.29.2