Received: by 10.213.65.68 with SMTP id h4csp1666719imn; Mon, 19 Mar 2018 10:03:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELuVmjLlr/2zxq3VcC7YohCfAdAYeeJWq6xm6bGRiZc7+aD65+Eh2PFs5emQQVh5uYgZvjq+ X-Received: by 2002:a17:902:7509:: with SMTP id i9-v6mr13299149pll.220.1521479023264; Mon, 19 Mar 2018 10:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521479023; cv=none; d=google.com; s=arc-20160816; b=VPVRKjFDYW3eayYKIQ8r5tmhwhR3RRkmhkiVylwEK1CvxL06/use/0VIAnw+R32eBN 5DtdWtX6OCiFwaADAE4lU6QZwYN6BjYwAOcHzYjr2ucH8y6Axva8dqxZDwFZv5qLMRYY aTysRlkFlXEZWv9Fze6vj/tcZ3FRw7lV1KlvrGrsihrUMMTbwqJo7x2wUlBdhmwrB1I8 66f3L/eS+Xwb1iuTctI5m2n/XwBl68l+eSkIMhd/8fPvwLaV9Fs9aokvTQyCQ05fcQ8z phuL+A3jTZtX1r7z8W7olaZyGW4TQepuMwDYithQkk6DaFJyOwWdKiAzZtpVGFKucmvz 0CNw== 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=QEi28DBxJokVh9NWeJKywBL59ZHsqKeDHFBQnW4igqo=; b=BoAg4A/ZVfkP25oBaZQwLk1CBkeOijZgsYpD/epjFZeFqSbJdU5ZEoo1JLcwFw+6Ko kINGR+UVpUKu46COaJsqmLAro4bpRkoGSRgivdwmfBUP/cjVEQyJUNKZ12UIqJw8HvAX xOlpM13IdsWv7GSP3V4wivOkFNHF/BvKpaVvjpTY4roCJohcbMO5V0cEMsPpXY07U9JP eRB8yq0VGFcefZqA53Phe9v0N5h0cnd4urrude3ffNnwAYxhsT5nWhb0FWvbOMNbPc+5 4h6sG2z8AQL3E6vqsXynzVvAA2Uy+IWOA9bqPWTb0r8W73WOHBk9t4dC7BoMVpa/xNPm Q2CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=b1z+ilC2; 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 x190si207167pgx.159.2018.03.19.10.03.28; Mon, 19 Mar 2018 10:03:43 -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=b1z+ilC2; 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 S966726AbeCSQLP (ORCPT + 99 others); Mon, 19 Mar 2018 12:11:15 -0400 Received: from mail-sn1nam01on0103.outbound.protection.outlook.com ([104.47.32.103]:51328 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966522AbeCSQJv (ORCPT ); Mon, 19 Mar 2018 12:09:51 -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=QEi28DBxJokVh9NWeJKywBL59ZHsqKeDHFBQnW4igqo=; b=b1z+ilC2x1Zkk7KqFlxqTgXHlmOE23Qo9qcNEUm3NdJkT+mhklUpbUzKAmASTwZcP25KytTUeJUnzkG1oHmC0zbDi1pAPaZnDZ2g2hjg/EJRDDzs2g0uyMGEWPqux1sMoGlzT2fNqJsHceJcs9Xx1mIkzoqes+61eDQS7KMgX84= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0902.namprd21.prod.outlook.com (52.132.132.159) 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 16:09:44 +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 16:09:44 +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.4 094/167] gpio: label descriptors using the device name Thread-Topic: [PATCH AUTOSEL for 4.4 094/167] gpio: label descriptors using the device name Thread-Index: AQHTv5xbhHKqIh7KaUW5x5q/EcBesA== Date: Mon, 19 Mar 2018 16:07:19 +0000 Message-ID: <20180319160513.16384-94-alexander.levin@microsoft.com> References: <20180319160513.16384-1-alexander.levin@microsoft.com> In-Reply-To: <20180319160513.16384-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;DM5PR2101MB0902;7:p6Mf6DLc2PMpMFAQWR/Z+JUIsUbNxzFT+PJbJB6+RGefpfXUaMwH5dxL32EdfCp0/MhjtVntuPpVSgmKT6qGsP2S/UqvNdUDNbOEBHKVtF5kOEqDJDkXEDPnLxHKgDlnpvT3Oo5KRCbdSW4QtJ69RQInbF3SgS9SK/xcuMV8U2MAsIKWib1yZyj2PTSGD7lj+AguzCWqxW/RJBjUCIuJe0ulDYqn26XGVSJuLFooN12HXCefT/ZppRd5Of4j58KB;20:CKD2NWvkPwd/nuJk3d2WXG5ahhdZL9qMnTF9j7t2JCOa47nd/HorAzVzYzzfDZG4F4L/yj+y+9XIhXskha6rZFhKLGG9MCP10yiygPqyQsV+jywACD3e1a8Lx/z0ulRdzLDPqjv8TtaMpOmFG+JNx0sweRWbcZYXIrscNMCOunE= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7dc95409-fac2-4fc5-bf42-08d58db3d46c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0902; x-ms-traffictypediagnostic: DM5PR2101MB0902: 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)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0902;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0902; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(39860400002)(396003)(39380400002)(376002)(199004)(189003)(4326008)(305945005)(7736002)(66066001)(105586002)(316002)(8676002)(25786009)(8936002)(6666003)(2950100002)(5660300001)(97736004)(81166006)(81156014)(3280700002)(22452003)(99286004)(186003)(2906002)(76176011)(5250100002)(59450400001)(54906003)(10090500001)(110136005)(6116002)(2900100001)(3846002)(2501003)(1076002)(86612001)(107886003)(106356001)(6436002)(6512007)(86362001)(53936002)(6506007)(6486002)(26005)(14454004)(10290500003)(102836004)(68736007)(3660700001)(478600001)(72206003)(36756003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0902;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: BbJCFcLa8aGkpaZTYz6DHe7xTT1Nn4Z1B2AmMAmWmcW3Qx0D1xDE+Ee1Pg9hChXFVdGtFoa4TG+CdF1/SXI3WA53Ouk3Xf4I3Q5pUJOZd2Ilez8cO7JG2uXbm3JCbF2vhkfT30R2PWSTX0+RljnESC/AUn0h6E+LSUDm5kDakgdUeQy3bEEbUhhnclR1Wa+5EM6Q0SAjHCLbyweN0G1F1h2NJGviKWItXFOWReeHY9bqvRYuy0L+ZCeYNT6o9Lr3KHnEPPWGWXdipM/PNA7U1748yxpWS5IQMLIQcA9Pd570JasLhoa8D9/ltRTYb0s1OcNvedL31Owdks4AnJdSdA== 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: 7dc95409-fac2-4fc5-bf42-08d58db3d46c X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:07:19.7326 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0902 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 06d345b087f8..759a39906a52 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2145,7 +2145,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