Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1527969ybz; Thu, 16 Apr 2020 10:44:34 -0700 (PDT) X-Google-Smtp-Source: APiQypLijwTdq+VNj9fOd3RACshwhB0J5lV7v6D8xWzH9SpM6oVuB1i85wuEQKnYxu3vXra1xCgB X-Received: by 2002:a17:906:310e:: with SMTP id 14mr11156387ejx.177.1587059074053; Thu, 16 Apr 2020 10:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587059074; cv=none; d=google.com; s=arc-20160816; b=XQENq0ZcjBcOLoF54QZak28rHcPiixKyyM60XzYaduJs1h/XK9Rf0K00bJkiuN1wNp zX8Rn/qxKen31kE8TxY0pocW645UCyeEBoe+qSLIZUd/cDpN5FyMI/SYsbdAH75xPk0A hNv50WTfwDfMoptFM/glOzeczk4qdk/S21G/xFTCf+/ONTRPPaFjOwk7b3/cg7Xv4czH Bs1zD/bh2NtdCe+jjXk57FkxSo/zJU7rUA+DX0lD8PutBYC3urAwkBCD6QNoL+8cMsUx xIcXbe+NmxeSkI5r1jo/p4431hVJxghDYJcDH5LXUnN320tN2rhypG6OdeVtYu5M/5aC 454A== 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=VhvjcmPsq5SFU9A9Zd3VR9kz91Ogv89Fgv0c7p+YkqdU65ikBJ6VigckQx1HlhnbJf zl/0j3WLSya2PsHkMTp9ejPas+saUqCVI6ALtfoGMuAP8f8A0ZkFlGSTieAe+q0dyWGX uIlrb3yBpFMzLxGkcEYukBpFT+OJRA8q5XudF9IdeOWwQRBbnUUBTBoppV8iceWNMmwi P0PWhBgbJZ7miCHVxreQ6yxQ6wtICKOxMsJB/hobzK+eEAn7ymNBD2iPDaa6kkv8YHW7 N/oGSD6zp1cXv7aURA3AdivliR1I0VyCVEBSrPY643KP+VvK2HL6SRd/3HLThj7jxL+R 8wVw== 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 w16si11608508ejb.521.2020.04.16.10.44.11; Thu, 16 Apr 2020 10:44:34 -0700 (PDT) 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 S2634712AbgDPL7G (ORCPT + 99 others); Thu, 16 Apr 2020 07:59:06 -0400 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:58540 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2634304AbgDPL6J (ORCPT ); Thu, 16 Apr 2020 07:58:09 -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 03GBtNxS027812; Thu, 16 Apr 2020 07:58:07 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 30dn7ung6y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Apr 2020 07:58:07 -0400 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 03GBw6jZ030802 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 16 Apr 2020 07:58:06 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 16 Apr 2020 07:58:05 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Thu, 16 Apr 2020 07:58:05 -0400 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 03GBw2DX013213; Thu, 16 Apr 2020 07:58:04 -0400 From: To: , , CC: , Subject: [PATCH v2 1/2] iio: dac: ad5770r: read channel nr from reg Date: Thu, 16 Apr 2020 14:58:47 +0300 Message-ID: <20200416115848.56156-2-alexandru.tachici@analog.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416115848.56156-1-alexandru.tachici@analog.com> References: <20200416115848.56156-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.676 definitions=2020-04-16_03:2020-04-14,2020-04-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 clxscore=1015 phishscore=0 impostorscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004160085 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