Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2920740ybb; Sun, 22 Mar 2020 10:52:22 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvPPkgpw5534fJBPRserhY+TiV0+eZjpSSOoSLbVlG5hN5vWHx4/nn4Oldnd6F1ZUFYWu/I X-Received: by 2002:a05:6830:3109:: with SMTP id b9mr15793690ots.369.1584899542320; Sun, 22 Mar 2020 10:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584899542; cv=none; d=google.com; s=arc-20160816; b=DZcS9nT3qgmMayZrjPwCHc7f2Iz+I+4y5KnzRAGjeqfXY9ySR5gRH1wKIjskljqNNQ /Y0y5AolYGkXJc5/f7rMKYQ+4pA6lWAsmW8RQbLsNJlqlytCScjZ/WykZaerU7rJ9vuI j85vdldnBjBjdRxAWwhA1Z/uWEQG+KDsO9sHkOIk1DBvYj1rrSAFvv2U2+OzQI+QTePN T62IwuhcoA/IP5Rp2+oiEVssHXG+RTSNqMT5zu2pYzDRn1W7lIkQTNhjiIGusJaxTTan k+8n89ZBpoKqfr5wRg/hP719GINFG6wlqHq+VfxYkaLiyENN2kEM6obEcWLoZD9tDyiy gaIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=kbEKBl1iN1MUy1M2b6C3Twush+v2SNGf+9USGfD0EbU=; b=Xytqgr3iEGM9AboyTw8bINwZa7EaU7P6L4RldSa7SPcLgqQR599xMnFpfl6qyoTbA4 ApsPagAZ6jxSSeEMqTjDNaHycSVu/NV/FUm2mS8HNkriwpjxpbFaDUo2rFgR03OOoqeu 0nK2YuYEVFnXm5188bmhakiaaYA2SBRx8HqzixK4LDH4l9FtuGicuPe5Ts86a0A4RJ3j AxUJP5Tv6wt2Vca4GRr+mTyLyLeCca/MheMU2jYkr/6ps06t1CMgIKVShvlBSNT421R0 n6BN+8cGI8l/x327O30V3kq/ba8vqxVZFVlDOCRNyhxe8lgg+eLmlSY/WbBpja9eagi9 g04w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ktftY6of; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si7330754ote.303.2020.03.22.10.52.10; Sun, 22 Mar 2020 10:52:22 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ktftY6of; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbgCVRus (ORCPT + 99 others); Sun, 22 Mar 2020 13:50:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:33012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbgCVRur (ORCPT ); Sun, 22 Mar 2020 13:50:47 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A1FC5206C3; Sun, 22 Mar 2020 17:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584899446; bh=Sh7L3UieGYgixm8GAYfakbok0Y3K+sHMc1ocIK9XGkg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ktftY6ofPak9V2HY5dfbS30wwGib13PT/8ptEYmPwtilPfKvU1P0KmPJUtDPaf0XO 5N8GybHQEcLNsSyOqaovwArE4vDlxcnzseasiGCYzq1CrDO4iLJLuFsZISf9XR8B+a /Xw72O8RB+XdYs3bCgvjyN5wkKoeQfLDG+oFv3to= Date: Sun, 22 Mar 2020 17:50:42 +0000 From: Jonathan Cameron To: Rohit Sarkar Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, alexandru.Ardelean@analog.com, dragos.bogdan@analog.com, Matt Ranostay Subject: Re: [PATCH v2] iio: health: max30100: use generic property handler Message-ID: <20200322175042.7903862d@archlinux> In-Reply-To: <5e6e48dd.1c69fb81.11507.523e@mx.google.com> References: <5e6e48dd.1c69fb81.11507.523e@mx.google.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 15 Mar 2020 20:55:12 +0530 Rohit Sarkar wrote: > Instead of of_property_read_xxx use device_property_read_xxx as it is > compatible with ACPI too as opposed to only device tree. > > Signed-off-by: Rohit Sarkar Looks good to me. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with them. Thanks, Jonathan > --- > Changelog > v1 -> v2 > - remove of_match_ptr to make it possible to use PRP0001 ACPI based > bindings > drivers/iio/health/max30100.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c > index 84010501762d..546fc37ad75d 100644 > --- a/drivers/iio/health/max30100.c > +++ b/drivers/iio/health/max30100.c > @@ -16,7 +16,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > @@ -267,11 +267,10 @@ static int max30100_get_current_idx(unsigned int val, int *reg) > static int max30100_led_init(struct max30100_data *data) > { > struct device *dev = &data->client->dev; > - struct device_node *np = dev->of_node; > unsigned int val[2]; > int reg, ret; > > - ret = of_property_read_u32_array(np, "maxim,led-current-microamp", > + ret = device_property_read_u32_array(dev, "maxim,led-current-microamp", > (unsigned int *) &val, 2); > if (ret) { > /* Default to 24 mA RED LED, 50 mA IR LED */ > @@ -502,7 +501,7 @@ MODULE_DEVICE_TABLE(of, max30100_dt_ids); > static struct i2c_driver max30100_driver = { > .driver = { > .name = MAX30100_DRV_NAME, > - .of_match_table = of_match_ptr(max30100_dt_ids), > + .of_match_table = max30100_dt_ids, > }, > .probe = max30100_probe, > .remove = max30100_remove,