From patchwork Sun Sep 1 13:59:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786472 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 8B13017C211 for ; Sun, 1 Sep 2024 14:01:03 +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=1725199263; cv=none; b=rUiiFuBgG4cMorx1IxQdRXAHBqkrd89GShzdoqm5QFFJ/yym/y0JG7ho5KCtIknNKow+lQP4/ThjBdTpCLlglbmgZ6jqm02iHJGMo7Jh+kJVqvi7pyjlvfsFBID7wSGCbxXOeDU/2DNEALnXWsJt0IEJqPLaHF3NnV3ipwPaiLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199263; c=relaxed/simple; bh=g8JuZv5hc41PQp8AhS2e5KtuIOdFwG819wzBMMn4p7s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s8bHVWpNubdcNIM3o6eOY5ZSA33NJi7qLLVCDGtcofykmWV4tZoLgY8K9l+YfEDRzP7pzBTJwxhz7fKMX/kKXu7xkkQza7VTqwfYLC6Gxu8eeOI16EUWX9D5D1gtRhw40/EWNpuFbIwpZNlQTM046FAXu2m0RvDCmi53LqobQ6M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YR2Td05O; 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="YR2Td05O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B033C4CEC7; Sun, 1 Sep 2024 14:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199263; bh=g8JuZv5hc41PQp8AhS2e5KtuIOdFwG819wzBMMn4p7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YR2Td05Oe8a2uC1b/Wk2ZVg4u9qCWDL4vUPK1WZyhppBnTcmp66Kc/1U3CCRhZ4Ni Cynyfb13ysj2cqOeqKb/vdcLhM3Ab2EtYsPGaHoZ+UEf7upeKbsKxL4pFYO6IBoeak x6uaq2ogQHZW0I24aG3Eyn9fB3gv6qA0oUHsIE5HVzqmJWvFC8ceW5BbESaoJjwqIn gD8GPLWlL0kOe+/ZYknq+G/2pHsWAXuHTXrNC/bjXpLCvbI7aS1Ol52MC7apfoSCIK WsgFp3MsGdaUFRF4+0P0Nk/amvuoJmxcrXm6fzDlxXATt1eq+e0gLyOAd+bf2pERqK ygY1uUyCRavYQ== 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 14/15] iio: magn: ak8974: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:49 +0100 Message-ID: <20240901135950.797396-15-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 Reviewed-by: Linus Walleij --- drivers/iio/magnetometer/ak8974.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c index 961b1e0bfb13..8306a18706ac 100644 --- a/drivers/iio/magnetometer/ak8974.c +++ b/drivers/iio/magnetometer/ak8974.c @@ -910,7 +910,7 @@ static int ak8974_probe(struct i2c_client *i2c) /* If we have a valid DRDY IRQ, make use of it */ if (irq > 0) { - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); + irq_trig = irq_get_trigger_type(irq); if (irq_trig == IRQF_TRIGGER_RISING) { dev_info(&i2c->dev, "enable rising edge DRDY IRQ\n"); } else if (irq_trig == IRQF_TRIGGER_FALLING) {