Message ID | 20181125225217.23201-5-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-mmc-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A82813AD for <patchwork-linux-mmc@patchwork.kernel.org>; Sun, 25 Nov 2018 22:54:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F03F42991E for <patchwork-linux-mmc@patchwork.kernel.org>; Sun, 25 Nov 2018 22:54:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4CB929923; Sun, 25 Nov 2018 22:54:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92B3929920 for <patchwork-linux-mmc@patchwork.kernel.org>; Sun, 25 Nov 2018 22:54:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726059AbeKZJqy (ORCPT <rfc822;patchwork-linux-mmc@patchwork.kernel.org>); Mon, 26 Nov 2018 04:46:54 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45085 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbeKZJqy (ORCPT <rfc822;linux-mmc@vger.kernel.org>); Mon, 26 Nov 2018 04:46:54 -0500 Received: by mail-lj1-f194.google.com with SMTP id s5-v6so14809491ljd.12 for <linux-mmc@vger.kernel.org>; Sun, 25 Nov 2018 14:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2AkoPV+YNkMJyxR5Ci9HnerZU+EDw3ROptFTcdcTnmA=; b=J/601mhSHyPS2jeLbG90gMcMV90TLU0j7MrQsthHmrbWDDAiaoPZKqUKEIJjY8t97r +cX3bAMKGOteMixG/YvPR8jAvQunL3+2/IchCr6zWxtjXFyqBXM6UyzpJJjdtIuF7O3W tAAhTSBXiKPosuIcemB7weoq/9+4dkCB4uBO8= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=2AkoPV+YNkMJyxR5Ci9HnerZU+EDw3ROptFTcdcTnmA=; b=ue0sQiOvxBgKhJQ0AxTsYFsPY/9uSrViz2qHs1flk51Oub3+EaR12co0gHm9rSyMY2 ZRnGldc2L8Fz9ywelzYTRWO8ohNIPtujmRIXJmzrDP0H0uL6iXmN0p2t5tNZREqO2iA1 O/nfB/rLX6lJjrm7D8EG/QbWhIlslOQ3Kkgtbqto6/AVKl9DOlxMNgf8Z2lTnsabKoZ6 Yzxd1l2qiJV8LWyX+9mHWti3SGWNYYWBnL6WsAes2qhsw4hcx3+GCRYM489Vc337sCtF ww2x5iA6ekwOVrt/DOBIGJ2JK6KbMbQc6r8mHHCxm8lsvJb4SXKqMuj11+HEjEhlsBRJ Qs0Q== X-Gm-Message-State: AA+aEWZn1hNEpQyiufCGvk6xZsCxWoZEKXKtEJ3zhq1u/9SoH9axiOIT eKpf7H2yjPANnH3XQN2FiVfqrA5CmO4Y4A== X-Google-Smtp-Source: AJdET5ebptjLRIvzo71SuYpcmZ81kUvTIVv/ZIWI8cnACdID79zJMtmrgjLrDCp2eqiODX3Ydj47sw== X-Received: by 2002:a2e:4c1a:: with SMTP id z26-v6mr16592790lja.136.1543186480617; Sun, 25 Nov 2018 14:54:40 -0800 (PST) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id c19sm9047235lfg.86.2018.11.25.14.54.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Nov 2018 14:54:39 -0800 (PST) From: Linus Walleij <linus.walleij@linaro.org> To: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org> Cc: Linus Walleij <linus.walleij@linaro.org>, Robert Jarzmik <robert.jarzmik@free.fr> Subject: [PATCH 04/11 v3] gpio: name PCA953x gpio chips after device name Date: Sun, 25 Nov 2018 23:52:10 +0100 Message-Id: <20181125225217.23201-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181125225217.23201-1-linus.walleij@linaro.org> References: <20181125225217.23201-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-mmc.vger.kernel.org> X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Use GPIO descriptors for CD/WP
|
expand
|
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 023a32cfac42..540166443c34 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -449,7 +449,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios) gc->base = chip->gpio_start; gc->ngpio = gpios; - gc->label = chip->client->name; + gc->label = dev_name(&chip->client->dev); gc->parent = &chip->client->dev; gc->owner = THIS_MODULE; gc->names = chip->names;
Instead of using the name directly from the I2C client to name the gpio_chip, use dev_name() on the client->dev, so we get the sometimes more unique device name, as I2C has a mechanism for naming its devices explicitly in e.g. board data. This is a prerequisite for being able to reference uniquely any I2C GPIO expander defined in a board file when setting up GPIO descriptor tables. Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- ChangeLog v1->v3: - New patch for some PXA lookups to work - Ulf: feel free to apply this with the rest to the MMC tree if the rest of the PXA stuff is applied. --- drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)