Received: by 10.213.65.68 with SMTP id h4csp1861443imn; Mon, 19 Mar 2018 15:32:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELss9PX+9iU4SLaoij5ZhMgFyoajIXvSzzYNzPgRjGk5yN/sMwe1JTYtweRT/PnAG+7vEGey X-Received: by 10.98.8.92 with SMTP id c89mr11480140pfd.154.1521498737081; Mon, 19 Mar 2018 15:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498737; cv=none; d=google.com; s=arc-20160816; b=DuBasUZLwE10iwbFHShrsYq/7seqDuB3q9foPb480Mg2lCTZj/Fy4DRtG2d/uLRdzM bCvDLCO/JvsLhePkGDsaEunYJ2WY4yRoUk98fjFwLeo2nnLjHhGlT7juU5DMRQMgkyCn iKmXQMNkDxUUXWeYUr+yYALDGeJ9S8WQgHa5wsWOJVFPRVR5IJedlwYIizm4GyYSEGpd ctbehC5xum4ZzUCddLhVMYaNIQ9cdPw8Y0tOBQBz2iHUay/lBo8NY6jNKtHdjJfVA7NO cucONonm6+PwYW4N9IVNqgPyXkekSl00YLUs/QzHz6oAeh2Eraa1VguD5LzhKacqGmVA HUjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=4FchJ+SVaykXLEKWv6/QOrC83v07UoRp8vfZcQHPMKs=; b=DWGHemxmnJWCrxsidG26wMSoqFjtkaWxiVwRhX37NWSgK3ebV/U1Y5wNKUhWURUbOr oyKNRVpzW/rxLphB5wx7CQ5V0Au0MG8BCkrO/OUrv+Qj+IowzU+pQSa29PcgKgW674i3 fpj040Gpf2vp3q8mclQkxsyKhaumh1E4Zb2xAVkFBdpVdMeg+M7bTpi2aUVnmPOrI13/ 15jzB7dq+j5A5Wq2V5uNGWtvhAUInRH3UV6MjPpE+OSIwlYw8C5SmKAo5geOeN2nVa2q TGieSsZgaZqtVX4Xjp1BbKXYMwDcIXDy2RJVHZKCKc7nPl6J+PVxA6UzQ+dr5sJUt37+ nt7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=RlGRL7j2; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h91-v6si225963pld.14.2018.03.19.15.32.03; Mon, 19 Mar 2018 15:32: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=pass header.i=@microsoft.com header.s=selector1 header.b=RlGRL7j2; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936599AbeCSWaS (ORCPT + 99 others); Mon, 19 Mar 2018 18:30:18 -0400 Received: from mail-by2nam01on0106.outbound.protection.outlook.com ([104.47.34.106]:16179 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933522AbeCSPsa (ORCPT ); Mon, 19 Mar 2018 11:48:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4FchJ+SVaykXLEKWv6/QOrC83v07UoRp8vfZcQHPMKs=; b=RlGRL7j2YKOK1sbQtq2sYZjqGDag1uy+/YHEVk4CyrTDj+ONbSJr+yOQN7iBWJBQGFugQRQK3NLWitMqZ2XAlPr5khVKfqA6DCxpMdbqwpktW7t2i5EXWwqZyg0ecsThA4iy4HzWh7XvNerLj91+DUEb5L6ibTGoczUfGjjY0As= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 15:48:14 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:48:14 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Linus Walleij , "Reported-by : Jason Kridner" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 052/124] gpio: label descriptors using the device name Thread-Topic: [PATCH AUTOSEL for 4.15 052/124] gpio: label descriptors using the device name Thread-Index: AQHTv5ml+sln5ZcwBkSMg1noXkQBXQ== Date: Mon, 19 Mar 2018 15:47:54 +0000 Message-ID: <20180319154645.11350-52-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1031;7:jnORC4JQqwlQ2YYGePIpKHtm9t1dbneZQ2qNHZvn5j3dVMxZb91m2MnRDhkhHtB2q7Z4EynDi7tl4VU1ZrKeX4oi3roTGHXnS8ApLobpLqmHQBUU1+2zXzBVuv1gVScFwdV5/CSMBHudzSJNxuzrZnVl4OcoaK2kCwADbdVcrLEAdsb5XT29XLzsm9JX+kMKPnj/dO8iqTNG/5WC9ci6Rvp0naTBZCFw7pj4KpHfs2EGju3xsEsQKgOAkgsA7Q4Z;20:ItCoAxTxXzHRGc0Ym+ZyhYd0sSl289hKy+arF9nRNZmoqka4xIy20BjvsOB3nkWTY1qMURk2ZLpafs5WYGDcAKrVZK7+eOYliy2iAWazeBoBP+/rh1EJKfZEsQyu7L7JVq1Zh7gYRdHrMoDlabHmlR8LSX1lKGLNa4IW5WBq0zw= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 67d6edc2-f158-4025-2ebf-08d58db0d33d x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501300)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1031;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1031; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(396003)(39860400002)(39380400002)(376002)(189003)(199004)(6436002)(6512007)(6666003)(3280700002)(2950100002)(7736002)(6116002)(3846002)(10090500001)(105586002)(4326008)(5660300001)(305945005)(1076002)(81156014)(2906002)(6486002)(81166006)(8676002)(8936002)(2900100001)(106356001)(36756003)(68736007)(54906003)(3660700001)(22452003)(97736004)(6506007)(25786009)(59450400001)(99286004)(10290500003)(76176011)(66066001)(14454004)(72206003)(478600001)(102836004)(26005)(186003)(316002)(2501003)(110136005)(5250100002)(86362001)(53936002)(107886003)(86612001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1031;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: SU7nwxjyDkgGecyRovQc09Ia0QyadCEylaD40h6x3poN1MSNWv6GmdnpkNeKPhBmg0VdWQ4vYLp8i1IKw/aT4izK2phmqFc7dWyJnSsnbQ0oNOOqXEGCQ+7s3OFaRaoG2DjhJ0CwfEyMa9ZbRLn+uff0gTpXMbuk7D9l6evzBeNNMNvwcLRArX7CY1Z/QFcCS19Q6KYnsUHUas7JUHerKNzIM+DLxcNI3yQuyib0Lg8eLTfgJ4q0l6diJ4Ukx7y/iyA2eywnJkv7qamIKGh/9U204tmV5hc/FkvIbmp5beJDGtUPyo9WCXtPtdyP0ythoQXhCw8jRLhsOk7QR8JZ8g== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67d6edc2-f158-4025-2ebf-08d58db0d33d X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:47:54.8581 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 24e78079bf2250874e33da2e7cfbb6db72d3caf4 ] Some GPIO lines appear named "?" in the lsgpio dump due to their requesting drivers not passing a reasonable label. Most typically this happens if a device tree node just defines gpios =3D <...> and not foo-gpios =3D <...>, the former gets named "foo" and the latter gets named "?". However the struct device passed in is always valid so let's just label the GPIO with dev_name() on the device if no proper label was passed. Cc: Reported-by: Jason Kridner Reported-by: Jason Kridner Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/gpio/gpiolib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 8abdd0035091..c6c499691541 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -3638,7 +3638,8 @@ struct gpio_desc *__must_check gpiod_get_index(struct= device *dev, return desc; } =20 - status =3D gpiod_request(desc, con_id); + /* If a connection label was passed use that, else use the device name as= label */ + status =3D gpiod_request(desc, con_id ? con_id : dev_name(dev)); if (status < 0) return ERR_PTR(status); =20 --=20 2.14.1