Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4114330ybl; Tue, 20 Aug 2019 07:13:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8RbCQxvzgoMqkPlAQphfMql6pOS3TvJYT8rAeshv3t/1hlhG55BeyYHbMXeVkZuq2x8n4 X-Received: by 2002:a65:48c3:: with SMTP id o3mr10397751pgs.372.1566310397206; Tue, 20 Aug 2019 07:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566310397; cv=none; d=google.com; s=arc-20160816; b=yYjToqTksJUASjxlwtjVpzuXaCZSVtlH5+YW6cW2FzXnmAIcK++PaQKnP32j8B1MWJ gtPnvzHBC77noYR8Y7OXgAg6ft6fVrREv3w9VtJ0UJVQ979VmjtzUcSao/keggdsgEzK +oDaLPH5dVRdiyhkMq7IVOwA5uTt9ehQ+q5Ay8Z10xr2BoS/HPt+ahSpMYW9h++03Mb3 bIB0tWWjBxna6JI9NCqowmhpZ/lVfbyE7EjZqI1FAU1Cvwyh6ZrkLkBGh5Qq+npsO3mR wNNohr6SL9S0qk2V0ZohQdLDHRw5SWZSNxHY+BaLmkCmxuCqkE4oNLdRXZQy6bPCOdMg /a/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=RwUl0tIvIWQJjsPo9IUx0TKimtG4MbaxDyHxqkSvC5A=; b=PfbPp0G2SsHEzvPpRadeul1rInAo1OzbxQo5XxwAKgzOzfcSAtp6kt1CKIubvLQPon XpmMuuEzC2EssCb2pLVr5/OgAIgdwCy/9V+BFdt3G5F2BFxpR03jhYywmiJB7bzn4KSe daF/IldYmQM6nU0YGYFNjGak3AMxtWHRNQu1IKyPwDO+ys8X82bxreh4pg0R99QIYOMX b7bQyC3AKsAHihhBPTQZWd+odf3ZShxItKiOmlmeotY8NAZU06ae79rVu7V3IzOzgWlI CB6dikrR1MFnVvU+8jwrcyMYQSo3ANwDJl79i9lFjajZ5Vs7r2PgzMrKLEh3fgCOjROT MFdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=ft6JmqWg; 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 ce18si56034pjb.70.2019.08.20.07.13.01; Tue, 20 Aug 2019 07:13:17 -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=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=ft6JmqWg; 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 S1730350AbfHTOL7 (ORCPT + 99 others); Tue, 20 Aug 2019 10:11:59 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34672 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730261AbfHTOLz (ORCPT ); Tue, 20 Aug 2019 10:11:55 -0400 Received: by mail-wr1-f68.google.com with SMTP id s18so12590101wrn.1 for ; Tue, 20 Aug 2019 07:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=RwUl0tIvIWQJjsPo9IUx0TKimtG4MbaxDyHxqkSvC5A=; b=ft6JmqWgSOSM4d24X1q0N2J56uYy/FU4k08SXAeJ6pgdaXJ5cYbZX2WQ70C3sFnKQV 4iXZe7h92gIl9tNrovxEYNUXt04plhsbh4BJqzGndjegbiJfrB7N8xhJCG7ZvR1SACp2 2/VVKPaWXVbDNH6tijKiFQui4GLWVWScAtnfxqMAHfmJrd4GRQlK/NOJn59hI/ng/kYf fOlUF2vWVCwdU9uOBqJSgHdWj5Qe8GwEov/sD7ufWQpV2T2WdzrCQXAy44eL123/Vasu 1hPW9gsS/nzyJbhHGtH25EisfEton7FtFTT1lySEcdQk8smMI55NJB2JUdY5gRJKv5Kz G5yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=RwUl0tIvIWQJjsPo9IUx0TKimtG4MbaxDyHxqkSvC5A=; b=O85+hoOFACrTTGofQHpD8GbVZJpo6MzwP+oUOUhuYdijMaNddxHgqZDk+aZMuZekTE Bhamr+yDQPrNKXP6Miv4TWcbCpGIoN3GtxkhPtn89+MG+tiAKzB1AQPvP/srTaUxeTAE tuwO+vyquJfXaZW3JSgyebwFNYExe72IkXlroZefMceJzL1Eo0so8LA+Z8ivOKEOLdwn d3mSEjbT0Hss8F3/b5w22rsRhk1h0okYFAgW7B3YGiWK93decaVGu2zYWNaAkJLiEAX1 C8mM6yFflg8c7fb4qphn5SCMBXO28TGy0IKMLlRvEauP2JAUESTBPE1MCYgc00S6qytB nnoQ== X-Gm-Message-State: APjAAAX+uuTXWQiWtcSrtySAcVwIKN7jOu41Gy+grriuutUEG/ZwuONJ TqJOZufGD5tnW/Fc00GZy+3pfDj92I0Ftw== X-Received: by 2002:adf:b64b:: with SMTP id i11mr35140281wre.114.1566310313897; Tue, 20 Aug 2019 07:11:53 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id 2sm84660wmz.16.2019.08.20.07.11.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Aug 2019 07:11:53 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, linux@roeck-us.net Cc: Colin Ian King , linux-iio@vger.kernel.org, =?UTF-8?q?Stefan=20Br=C3=BCns?= , Lars-Peter Clausen , Jonathan Cameron , Peter Meerwald-Stadler , Hartmut Knaack Subject: [PATCH 4/4] iio: adc: ina2xx: Use label proper for device identification Date: Tue, 20 Aug 2019 16:11:41 +0200 Message-Id: <0542b562a813c5c22c42484ac24bbb626ac3c022.1566310292.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for using label property for easier device identification via iio framework. Signed-off-by: Michal Simek --- drivers/iio/adc/ina2xx-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 7c7c63677bf4..077c54915f70 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c @@ -1033,7 +1033,7 @@ static int ina2xx_probe(struct i2c_client *client, snprintf(chip->name, sizeof(chip->name), "%s-%s", client->name, dev_name(&client->dev)); - indio_dev->name = chip->name; + indio_dev->name = of_get_property(np, "label", NULL) ? : chip->name; indio_dev->setup_ops = &ina2xx_setup_ops; buffer = devm_iio_kfifo_allocate(&indio_dev->dev); -- 2.17.1