Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1862764rdb; Thu, 7 Dec 2023 10:38:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdZCI87NhasmNR1bx28xatSHDkl1M4+nHTypj0vleHPzwrXp7EbX62FwkTLlWszLQKeWa/ X-Received: by 2002:a92:601:0:b0:35d:6508:5e39 with SMTP id x1-20020a920601000000b0035d65085e39mr3685598ilg.4.1701974335526; Thu, 07 Dec 2023 10:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701974335; cv=none; d=google.com; s=arc-20160816; b=zyn8j1f8C1Xo7ozgsz73oFlD+eI+Fxa1Kf3FGS8MBMENiSKPh5NhzROCh5EAYNlhUt /3L25D91TLpi2ZmJ+eqpLcq9444i8HN166AmPyMc4nFX+2bYE9cLkvoiz1xKbISo+ceT vnIX5ihH31ePZGHY5MR40Szif76uiaPYBZvHguz8z6A/GHX5yTo2Fll8ZGFQIAgY15vl szwhdrNi1ILexG6qfT+t7MepeUMjvnGmz8PfO8ZrW5H59tw3+Z9A2ruSv8RunVYprAm1 fqUw/AL9x+eNtHs0cyLySxacr9pobU0GoSNggOsIqgsGf1dgkAj3wCHhbMEhyjkFImtH rEEw== 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=FTR8RPF64WEFloGqBWcYLGdI912tNL/322eCzE17jSU=; fh=EXgg9YqnApgKKZYhZSosPcHJkz7G44hkaqfseiwxB60=; b=uqiT/796byDdOAhia05m+1b07Gn8Ps9V7DBx3zi0CxyYuMwAKEvJ1Hocl4RKZfXuW5 xrskXiIGDVIMeoiCoUO6bvgwEvlJY0918S2CD5rycYGZWEkDLyHsU3wdZiSlsIYWtYez 8MYfY4mHnhJw2Jb6I2EEc+1Ft9JMLQ5VNgdh6dWW/hCgMGQrNgf/ylNGH56tRruTtYmH zVO2Uafqkosp0zifk63oC0p4p3bqiX/UkpBa7Q35bvLWZi2TRJJYOboWiFKC5VLPqj4H xB/fYbLTNCMHmOOenpIvGlYF0LmEM6778IHZLRdRYAZjX3/IXVoUMljHFd23H95t2LOo ypVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id k10-20020a65434a000000b005c690ba4060si102937pgq.261.2023.12.07.10.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 10:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DC0B58021EC1; Thu, 7 Dec 2023 10:38:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443326AbjLGSih (ORCPT + 99 others); Thu, 7 Dec 2023 13:38:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjLGSig (ORCPT ); Thu, 7 Dec 2023 13:38:36 -0500 Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FA7B9A; Thu, 7 Dec 2023 10:38:43 -0800 (PST) Received: from pps.filterd (m0375855.ppops.net [127.0.0.1]) by mx0b-00128a01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3B7HfSFR032162; Thu, 7 Dec 2023 13:38:25 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 3uujny87m6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Dec 2023 13:38:24 -0500 (EST) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 3B7IcNJx024416 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 7 Dec 2023 13:38:23 -0500 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 7 Dec 2023 13:38:22 -0500 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 7 Dec 2023 13:38:22 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 7 Dec 2023 13:38:21 -0500 Received: from work.ad.analog.com (HYB-hERzalRezfV.ad.analog.com [10.65.205.129]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 3B7IbxCa015129; Thu, 7 Dec 2023 13:38:02 -0500 From: Marcelo Schmitt To: , , , , , , , , , , , , CC: , , Subject: [PATCH v3 02/13] iio: adc: ad7091r: Populate device driver data field Date: Thu, 7 Dec 2023 15:37:58 -0300 Message-ID: <14973feb4c0f4ad01a0e5047407c93ce9b9e5463.1701971344.git.marcelo.schmitt1@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: 3Wzdlu1wudgA7SUZQRp6qWolFXqT608o X-Proofpoint-ORIG-GUID: 3Wzdlu1wudgA7SUZQRp6qWolFXqT608o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-02_01,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 adultscore=0 impostorscore=0 spamscore=0 bulkscore=0 malwarescore=0 mlxlogscore=944 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312070155 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 07 Dec 2023 10:38:53 -0800 (PST) Set device driver data so it can be retrieved when handling alert events, avoiding null pointer dereference. Fixes: ca69300173b6 ("iio: adc: Add support for AD7091R5 ADC") Signed-off-by: Marcelo Schmitt --- drivers/iio/adc/ad7091r-base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c index 8e252cde735b..0f192fbecbd4 100644 --- a/drivers/iio/adc/ad7091r-base.c +++ b/drivers/iio/adc/ad7091r-base.c @@ -232,6 +232,7 @@ int ad7091r_probe(struct device *dev, const char *name, iio_dev->channels = chip_info->channels; if (irq) { + dev_set_drvdata(st->dev, iio_dev); ret = devm_request_threaded_irq(dev, irq, NULL, ad7091r_event_handler, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, name, st); -- 2.42.0