From patchwork Sun Dec 2 08:43:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10707899 Return-Path: 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 D7C5D16B1 for ; Sun, 2 Dec 2018 08:46:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBE2A29C9B for ; Sun, 2 Dec 2018 08:46:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD07E29CE1; Sun, 2 Dec 2018 08:46:47 +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 6318B29D8E for ; Sun, 2 Dec 2018 08:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725802AbeLBIqt (ORCPT ); Sun, 2 Dec 2018 03:46:49 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46900 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725771AbeLBIqt (ORCPT ); Sun, 2 Dec 2018 03:46:49 -0500 Received: by mail-lj1-f193.google.com with SMTP id v15-v6so8585472ljh.13 for ; Sun, 02 Dec 2018 00:46:44 -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=K74rseFX1jUL8draG6vGkYAMpMbMl9wwkGUrNJJHdgU=; b=BPWvGKCcBbjyS/dv1Th+i3rW5K7/7woKgBOeBp9XXesNjYleWLGvPaXGfPfc++Om51 YvjOvnNsjaH7vETELTnAmLAjSYNMsl3iZJe/WeNPpTrVMvtgQG7TQ/bT8NAOtOkSZ3PW 5BhdFWA6D1Rv8pHKm6g+q59wMT6ss6v0Tv9OM= 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=K74rseFX1jUL8draG6vGkYAMpMbMl9wwkGUrNJJHdgU=; b=XX8V34wVsrKCw6/oG7+LwSPgmbzV2zdFDSttRBFY9Dk8cXgScKDe0cRHA1mgCecHCn 2aNhSSMzg7DeDXB6ViZc22T8s5Eyw3a9ajAUV71XOHlhNr+RUmCDnMrhMEY+67wCO4CI V4uSpkgE22LiAmHbFgDG1EvrVxsMQkKWiW00rP/dycHgx9ANN35AJUR4hgspS1Hl5tk8 0kDoHGK+0xpm+faWxjlwHQSn3ADso0yTz0GITbpsbosZRY36uATb8H+ghEVi9Q+xn6yQ c6mn66FAw3pd+awtKih6jjz+Vxq9vzD99YTOoyZW74kINNPXrPaHuEPCcG4unZl6ZH8l 6u+A== X-Gm-Message-State: AA+aEWak3WeJLkDl/TO3GQzTwI8Ixkx4LyQQLu3RJMWRpX/zFANOxscV xj7yKcngC7Nce0FYD+n2k01fAAB5LH2KPg== X-Google-Smtp-Source: AFSGD/XbQJ4R3smQ/QCDyDNNYLHXc+n/mZVRj2VdTM2gErcZKUMdQHrFzdDfUIFJo9oV6eQUGi1agQ== X-Received: by 2002:a2e:7d15:: with SMTP id y21-v6mr6469773ljc.77.1543740398561; Sun, 02 Dec 2018 00:46:38 -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 z7-v6sm1772719lji.42.2018.12.02.00.46.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Dec 2018 00:46:37 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij Subject: [PATCH 04/11 v4] gpio: name PCA953x gpio chips after device name Date: Sun, 2 Dec 2018 09:43:21 +0100 Message-Id: <20181202084328.25546-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181202084328.25546-1-linus.walleij@linaro.org> References: <20181202084328.25546-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Reviewed-by: Robert Jarzmik Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Collect Robert's Review tag. 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(-) 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;