From patchwork Tue Jul 18 21:43:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 9849667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C434760393 for ; Tue, 18 Jul 2017 21:47:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF26E285FC for ; Tue, 18 Jul 2017 21:47:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4313285FE; Tue, 18 Jul 2017 21:47:53 +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=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 3CE5E285FC for ; Tue, 18 Jul 2017 21:47:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752961AbdGRVpJ (ORCPT ); Tue, 18 Jul 2017 17:45:09 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33355 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752949AbdGRVpF (ORCPT ); Tue, 18 Jul 2017 17:45:05 -0400 Received: by mail-pf0-f196.google.com with SMTP id e199so4073091pfh.0; Tue, 18 Jul 2017 14:45:05 -0700 (PDT) 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=boUQ1bPVyS7+KwRpSXp1SmYV1xAZa+TkB9EOq5E0b+s=; b=ZjLbMZqebieXhy/iD2iiMW91QVipMUsuHUs2IwxdcJ/qsNSt4/M13I+BeK6255uSiw UHpH9o4EIq0TkiwyQ5sYNmxA96g1NR/0JuhqAMWn8PEVhmlNG9SZl9W6jhBL6Coex4HB LJKrFpZxKJ294oz5YQs+YM1CizDQNEz1DjXEfMpmJMUcLRVJrRpAG8zZ+ZVN0DnZKemR s2FPK2SR+qTBPGHOr01OwUc4INhl9u1YhNl3HGNaPJ5fc02GVEMPC0L4LNLfcpCwt7g6 5DqdN7/azOF07/Cc7mbo4N5yG1r0PhicCMzkZ1GO7Q2rg8ZwA3cVldUbWDKl5NDSF7vn /GJg== X-Gm-Message-State: AIVw112fdD/2l219zUz2JYd7SYlOn75+1hgDcekLWs2SR7f9p3uQfN5l eUvqC0yq2EyGbXyEk+EpHA== X-Received: by 10.99.44.206 with SMTP id s197mr3830846pgs.116.1500414305401; Tue, 18 Jul 2017 14:45:05 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id r207sm7186560pfr.106.2017.07.18.14.45.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:45:05 -0700 (PDT) From: Rob Herring To: Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] soc/samsung: use kbasename instead of open coding Date: Tue, 18 Jul 2017 16:43:30 -0500 Message-Id: <20170718214339.7774-50-robh@kernel.org> X-Mailer: git-send-email 2.11.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In preparation to not store the full path of nodes in full_name, use kbasename instead as it will work either with the full path or not. Signed-off-by: Rob Herring Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Javier Martinez Canillas Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org --- drivers/soc/samsung/pm_domains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c index c630eba32066..7c4fec1f93b5 100644 --- a/drivers/soc/samsung/pm_domains.c +++ b/drivers/soc/samsung/pm_domains.c @@ -147,7 +147,7 @@ static __init const char *exynos_get_domain_name(struct device_node *node) const char *name; if (of_property_read_string(node, "label", &name) < 0) - name = strrchr(node->full_name, '/') + 1; + name = kbasename(node->full_name); return kstrdup_const(name, GFP_KERNEL); }