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: 9849781 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 0E40460392 for ; Tue, 18 Jul 2017 21:57:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA3F8285FD for ; Tue, 18 Jul 2017 21:57:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF16E28600; Tue, 18 Jul 2017 21:57:29 +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=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E2E3285FD for ; Tue, 18 Jul 2017 21:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=2LHEOXkdxbxXBNz0zTx8+0hBziGOQ0s1L+dFlt3a1XY=; b=b8z zutb8U/xAS9iumEgjZKYBg5nnXJDQ0fj1A84JN/mRqsZ3bDsDlpQSDBnY2zvHeOOycQHnyARLCWHh txnjHxVOSR1+LWKyvz9hWZL190PBHkRTMm7rUW9JY1N2B4y8Ej50VKj2gGns2Jzoy+cs1q59uWp3w liQmnIGoMNppF/Q7sRVaDj0yhhKZU4LvPXMzpI+oC38DjHwuGExCb0d2uwVcfDdfj0HabKO/y4NOB 0sO82kVsGYjt/tqJDynO/HjYrYWsInicHRU50KFz0v6Z1NfxYiugGQ3oYtva8sb5pVthAYZ0h4cfv V5pzhpOD82rNDeTYe8dF2EqbpDTCiWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXaUf-0002Tu-G3; Tue, 18 Jul 2017 21:57:25 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXaUe-0002Md-0n for linux-arm-kernel@bombadil.infradead.org; Tue, 18 Jul 2017 21:57:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=boUQ1bPVyS7+KwRpSXp1SmYV1xAZa+TkB9EOq5E0b+s=; b=iKAiumF6VV1Av63otQk09T72U SFyazblAUovcAhzWYkbBvCbNpE6Rm2+a3nFkyauE/UzTzan0ZfrD4pxYjJ56zy4Q7lQuQcu18eqir /l5lGr3DTKmTX7TTGMDqgvb/4VpEjDXHK+Xd8b9F4BZLvAAaRo9jzzr3CAPRe+WrRmvYy5Jk4diVb tsU3cXv8G7efCE+VBiwvaQdD7Qfkat5SiLtHqI1cwCL8XT0djL2fM4XYUDChYiI2ZAxcuk2vYTUQT BnjHH6SA46aTw9UbB7ybmpkdqb2o82O5nLHVS0GXNUb8ytn2OS+h3DpSD08D/Bc9PnlyiwedBzeT6 qbMn79u+A==; Received: from mail-pf0-f196.google.com ([209.85.192.196]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXaJ4-0006SO-8D for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2017 21:45:27 +0000 Received: by mail-pf0-f196.google.com with SMTP id o88so4066215pfk.1 for ; Tue, 18 Jul 2017 14:45:06 -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=pzJVuiz/h1clEZjZz9VODn5tjDOByvN+Xes5KhDmAOs3jgDJ31TxovLN+Y7t9M9LwA 1EcgPZIqaDM036TNPdZCj7YV38QKbbuknmMO4AfZ0eqKvFktIMupasGc69CUq879N4/2 uqShpf5t1gXdY+bhFgCKRTz3J2CMGDdj0fHUGL8197LvzzkXEwPUEQCJR80A7XtbnHFL 2iAcbPCbq3Kg5zjIzi0/XXjIQMSf57DSxHz3IwKl7kHI+yxw1rM47JAAHogUoChdKyDA LkWwdZcRrqW9JiaVfG7VgdIQP7rsM8lNh97dxWxgMaiXcmDJOy7LD2RJfi9mKVhqOEyB eh4Q== X-Gm-Message-State: AIVw111Vnq94lk68O3S4aPBO3vfZHAsrYCIo4fuXh5BTW+WoaHFeeub4 LLoddpRCeYaRJw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170718_224526_426015_50E523B4 X-CRM114-Status: GOOD ( 13.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 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); }