From patchwork Sun Sep 1 13:59:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786463 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A1691CFB9 for ; Sun, 1 Sep 2024 14:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199225; cv=none; b=Mg9V4Iadd2TQ0+urMKJJD2qfdtaTlUvQmdtQqKpnS+r4zYbbit0w4aDBqFMjGT05/aP+MMei0Ntzjh3PeWHvyGhU92/WrtlCGSoDn6s7UdaNV1wxxkbEEeukYG25B0nV8J314FqFldOc6RrDgoZ2NcQtrWVbI+odWun9sXpfoxg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199225; c=relaxed/simple; bh=Mhp6HRs/zBD+oOWJXdm4KkwZHLx7N9HeFcqIWsTbHLg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q6JIPMN8wIx+dwIg07HmJXN3tKNJnuK79GXmwKG5bPsOTSL3WDhFDbcigaSkRfTSEAqrkawBeG81Nzt8Skdkm1WHPmOMxuGb6eCodMz7WrE/zsrNRKZE0oc9HEE1MoRxuPLq0R7w2GWEoBaiVgpa4K4h+Am/Rb/VM3Z9bYZlrPA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bQbBm3bZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bQbBm3bZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A27C4CEC8; Sun, 1 Sep 2024 14:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199225; bh=Mhp6HRs/zBD+oOWJXdm4KkwZHLx7N9HeFcqIWsTbHLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bQbBm3bZcCkZWnMc9Gr/a4SF9VJgrvSneFyyDm6TuoZhHOEVgwYM+5azHLnEkI0G2 w9qbSO+HIDkU67c7Dwh6h5ip82cTTa5icwSgvZrj140kNsXpoJnedU7Ji+0U0nqXWZ mmv+Bvizs4+B5CuMHjQnmPfa4szJ947gXb06KizoL7rVpM2+Qif6kyUhYQ2diSSBYY WSiHxqp8VrrxpmEB+aI2yr7QrKjyj6alwu/7X1I0nHbp9eGofg6V+G7IkJ0IOTmCh9 +TAnGtcnIRMoCXDArLJ7F8UwWE1Srw/p4D4giJng/dQxKX7N+CLd01a6PsCvpEf29a jr+sQhg66/KhA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 05/15] iio: gyro: fxas21002c: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:40 +0100 Message-ID: <20240901135950.797396-6-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/gyro/fxas21002c_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c index c28d17ca6f5e..877a2b07cb23 100644 --- a/drivers/iio/gyro/fxas21002c_core.c +++ b/drivers/iio/gyro/fxas21002c_core.c @@ -849,7 +849,7 @@ static int fxas21002c_trigger_probe(struct fxas21002c_data *data) if (!data->dready_trig) return -ENOMEM; - irq_trig = irqd_get_trigger_type(irq_get_irq_data(data->irq)); + irq_trig = irq_get_trigger_type(data->irq); if (irq_trig == IRQF_TRIGGER_RISING) { ret = regmap_field_write(data->regmap_fields[F_IPOL], 1);