Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4651979ybb; Tue, 24 Mar 2020 02:46:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuEESkFUC9Gd4juR7iVlzFTjifQ6uN6IK3yTOwX/7aqn/VBSc6W0LHVOO5lcYTg6l/i0WRs X-Received: by 2002:a9d:67c6:: with SMTP id c6mr1028100otn.11.1585043165824; Tue, 24 Mar 2020 02:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585043165; cv=none; d=google.com; s=arc-20160816; b=xiAKCOYTD/Up7VQWiV3Vuk/OrQ09P9/FAbpEF300Dh3qQJkJXjvyQcmTDiYWDLIwbw cK5tLsAi1JTxy1K9AyMTfvGtNE634V4JCuRojKDcmohv1phrNkNR0QhP7gYGdo4YV81m L3m0unuPjIHHRtpvqvTq0k+34CDrgmqLwcg6EllHMwlxoz+jCvHT8Hr1hiWTEEdjGG5O xMdxyml0SYvcBmWkX6grZcgCAPil3pv0SoRNlelHi1lNmr9gH1M6Z17Pr6NaldA69Pz5 KGQOBComMxWeT8UaNcOLyasWnDVdiqgLUt4FrbgMbQKkVIb1zczl4z3dOvdgHSz8h0UR ipTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Z92wjMSjIXQ+eMOl51l8w42rDRV6UeJspX1YDHVBtOo=; b=XnBvHVBmKWLExepTkThj1jYsKTc3nhRX4f0IxWi+pDGXDuAfLVVqAhQUGhfJaZJoEb YMdyu30TnwOwn/HGA8kLFkEuSuZbbntlHQgr9sRMe9cVThp6mDxYTtf6lQCu78LcATp4 5lag5PaXk5hv6NsP4mY3KdWW0LdbSZDvccLxtDfTuI2sUY/eJA9PUL9tL0eJi+LyTIJ/ LYt4vnYh2OP6TRf9ZSEclSjtxPCJgaTvp9SZv37FR/C3HxeHEuwLkxy4QKIlRi0d+lZS Jv1Xb3dySwAEMFVFHkaaLBY2cko8Vq76e5RY7pc7KdmQVYSltk3Hg6N77a1VPfMfkIKW y/sA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si8495266oic.213.2020.03.24.02.45.53; Tue, 24 Mar 2020 02:46:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727194AbgCXJpg (ORCPT + 99 others); Tue, 24 Mar 2020 05:45:36 -0400 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:12258 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbgCXJpg (ORCPT ); Tue, 24 Mar 2020 05:45:36 -0400 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02O9jC1P007395; Tue, 24 Mar 2020 05:45:34 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ywcs61j6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Mar 2020 05:45:34 -0400 Received: from SCSQMBX10.ad.analog.com (scsqmbx10.ad.analog.com [10.77.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 02O9jWfP002596 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Tue, 24 Mar 2020 05:45:33 -0400 Received: from SCSQCASHYB6.ad.analog.com (10.77.17.132) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Tue, 24 Mar 2020 02:45:31 -0700 Received: from SCSQMBX10.ad.analog.com (10.77.17.5) by SCSQCASHYB6.ad.analog.com (10.77.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Tue, 24 Mar 2020 02:45:13 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Tue, 24 Mar 2020 02:45:30 -0700 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 02O9jRKh027422; Tue, 24 Mar 2020 05:45:29 -0400 From: To: , , CC: , Subject: [RESEND PATCH 1/2] iio: dac: ad5770r: read channel nr from reg Date: Tue, 24 Mar 2020 11:45:05 +0200 Message-ID: <20200324094506.55938-2-alexandru.tachici@analog.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200324094506.55938-1-alexandru.tachici@analog.com> References: <20200324094506.55938-1-alexandru.tachici@analog.com> MIME-Version: 1.0 Content-Type: text/plain X-ADIRoutedOnPrem: True X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-24_02:2020-03-23,2020-03-24 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 adultscore=0 phishscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003240051 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandru Tachici Read channel number from the reg property of each child node. Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support") Signed-off-by: Alexandru Tachici --- drivers/iio/dac/ad5770r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5770r.c b/drivers/iio/dac/ad5770r.c index a98ea76732e7..6302f11551d4 100644 --- a/drivers/iio/dac/ad5770r.c +++ b/drivers/iio/dac/ad5770r.c @@ -522,7 +522,7 @@ static int ad5770r_channel_config(struct ad5770r_state *st) return -EINVAL; device_for_each_child_node(&st->spi->dev, child) { - ret = fwnode_property_read_u32(child, "num", &num); + ret = fwnode_property_read_u32(child, "reg", &num); if (ret) return ret; if (num > AD5770R_MAX_CHANNELS) -- 2.20.1