From patchwork Sun Sep 23 14:08:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 147331 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1812085ljw; Sun, 23 Sep 2018 07:10:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV60FyDueejJNFgHtq/ihYT6G1FYKyn5Wg+HZavP4hi4jsbCYSN4kfYn2bOnHiAv+FVuzMz72 X-Received: by 2002:a63:3285:: with SMTP id y127-v6mr6036963pgy.104.1537711851139; Sun, 23 Sep 2018 07:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537711851; cv=none; d=google.com; s=arc-20160816; b=IGhBLIvK7Mg02uCw9xPW1xwKPo97oS5CcvYjoQfty5Fw5dAj4S2uIpT3GYkxo7yYDX J7ue+gjrkxzSdmjWFIaEdhdbbm36OMwoQhHV94Fpo62SzpuX7/GFWNRPISoy14/fZxAJ 1/uBg8JkWp+KLXq9vjTfJoMEAnlJ9OtaKZ6uZqKtWVsdBuKFCpS+jdojRh3XTsqY9Mu6 QxL4sNKGLDeNzKn23VhCzJx0HU+9goQiey7VmvjaCP03CJvGZNk2STfwyKYeyGf1anET tumcSmXi0A7QA072cuzey+/jiEhvcPHr8r/JcCTOWma9h9e7uKA6zkvti3nI1/jIw9T8 edEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=TAZqgh0JCimltfaMKltVGZCgvTvY7VHYSh0GdQgZOAc=; b=s1XwMVTuBtsKyUUGXdaYASYB/PdrjCauNhh+PiokU7hn8ZUPdYejI7Ibpf9kVTeFHS m7GvVa/xVq/2foGaKv+e7omugoEX5/5c79S4467T4/IHbr7iix1y+RUlAd/eJwdRTYrq UV4rEuDfGIY0FwuRIdZoRO8ykJfQsP0qasUT80UU6DsIzGiAN31feEDy0IAMWi7UwcCy l+Xz0ZIDxMvsb5OObxIDtH/ONkeaFqtne6B5Vw5z3vO1pM328kmruZf5pMlYa6qVtXjw mbW70qLY/O6sX2BumN9NqeSgar+I9rfEJVgcqW/l4pjlpeqYfKXmk9oJW8a3D4o/Lmid 4U+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W1/vzQDI"; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u22-v6si35235658plk.443.2018.09.23.07.10.50; Sun, 23 Sep 2018 07:10:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=@linaro.org header.s=google header.b="W1/vzQDI"; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726205AbeIWUIZ (ORCPT + 5 others); Sun, 23 Sep 2018 16:08:25 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46537 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbeIWUIZ (ORCPT ); Sun, 23 Sep 2018 16:08:25 -0400 Received: by mail-lj1-f196.google.com with SMTP id 203-v6so15937252ljj.13 for ; Sun, 23 Sep 2018 07:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=TAZqgh0JCimltfaMKltVGZCgvTvY7VHYSh0GdQgZOAc=; b=W1/vzQDIkNl8mo30i56djO5K9HPGIMefCcHDaN5oHBog6kgL1g2PDXQSCPFvDVJjm4 VuftC86DfsZdb6To9DlzRxTSdM9ytlmB5tys+lv7XlzzHCeUviwZPSJMInYQXQ5CJ5Jg 2b6MgENLZ0FtFeE9XOqM/weGYlCNRH4wQPnMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TAZqgh0JCimltfaMKltVGZCgvTvY7VHYSh0GdQgZOAc=; b=Lq0FJs4mlLd1zZvJRlwyiyvY7Dggx7NU1FAxP5oO8DNQqh4/uiggAtbt5lC/T02Ddj r6aB1XXisnT8ZiJOgVcdyL35bHaZGERmM/yLB9nDabr6skdxhdFpV+Ki4F6iJMsXrTb5 QT48+so5pxWkaACajmSSQPZpP/uG8PZ0SQw0W7oHGg35WC3cUBeYxc1RVreP6VXCJSR5 BENEoi0Xk2rXZ6cdWD1FlliNmTg19bdImj8LD+UBZ62yYDVaACx0uPH01Mt0wMSVRNeT z/x2Ln1OMHFsgW6qwFRvoBKwxID7GdaORLr3+iH5NTk55dp0VWEKFaGnD3Jn1SEjw2I+ O6qw== X-Gm-Message-State: APzg51AU5T0+K+39WRtN/II9NBkEj8h2NF205y4kj65VjuZ10YUhOSZ+ NL2F0tTK3vwPtWgS9xSMkCjqcG3jrSU= X-Received: by 2002:a2e:59db:: with SMTP id g88-v6mr4970610ljf.79.1537711846459; Sun, 23 Sep 2018 07:10:46 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id 12-v6sm81521lje.67.2018.09.23.07.10.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Sep 2018 07:10:45 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH] gpio: htc-egpio: Unique label per chip Date: Sun, 23 Sep 2018 16:08:41 +0200 Message-Id: <20180923140841.7995-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Give the HTC EGPIO chips unique names, htc-egpio-0, htc-egpio-1 etc, so that it gets possible to associate machine descriptor tables with individual chips. Signed-off-by: Linus Walleij --- drivers/gpio/gpio-htc-egpio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c index ad6e5b518669..38be44dbd6e1 100644 --- a/drivers/gpio/gpio-htc-egpio.c +++ b/drivers/gpio/gpio-htc-egpio.c @@ -334,7 +334,13 @@ static int __init egpio_probe(struct platform_device *pdev) ei->chip[i].is_out = pdata->chip[i].direction; ei->chip[i].dev = &(pdev->dev); chip = &(ei->chip[i].chip); - chip->label = "htc-egpio"; + chip->label = devm_kasprintf(&pdev->dev, GFP_KERNEL, + "htc-egpio-%d", + i); + if (!chip->label) { + ret = -ENOMEM; + goto fail; + } chip->parent = &pdev->dev; chip->owner = THIS_MODULE; chip->get = egpio_get;