From patchwork Wed Dec 5 19:50:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 10714817 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 541D0157A for ; Wed, 5 Dec 2018 19:52:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 473362E3B0 for ; Wed, 5 Dec 2018 19:52:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38CD82E3B4; Wed, 5 Dec 2018 19:52:31 +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=-7.9 required=2.0 tests=BAYES_00,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 D839D2E398 for ; Wed, 5 Dec 2018 19:52:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728599AbeLETwX (ORCPT ); Wed, 5 Dec 2018 14:52:23 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33916 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728814AbeLETvU (ORCPT ); Wed, 5 Dec 2018 14:51:20 -0500 Received: by mail-oi1-f196.google.com with SMTP id h25so18672694oig.1; Wed, 05 Dec 2018 11:51:20 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=P6eIG0/5LHUZfO4VXf+cpIcy6s1WeTN8+4j6CIdmGr8=; b=GTkUikNvdSd+pnZclrNqPR+iFT/iria7kAt7VMmQ+PIMKltr2maZPp8t7RH3TFFIts QO0i/gVDywlHz1t2Jz8AlSa6B3D1zRtxZB0XRCFeaSORJnMkFqNbTO3jotWeGAYySB2K 2PZhdFUJUPNL44BigfAhFAXlgjaWP01FxEP5NUMYEaiTiyNfy5xv8x+J/PGMPEd+ojLk wtGwFplrhmBvsS9KbZOi+dtfmoETn8X3HOwfgITI8vA1Z5IJS+jggTDMJ3TAjgujn2fT QHGoEmd8sL8VDwq1CxQuJC7dvi2DTKqPEPPLWltzSo3q2mkb3Mqtbzpe2aINxSaicr9+ ioeA== X-Gm-Message-State: AA+aEWbrZvoMCf+HaefUU1ddjOBy1m6RAAHvsh0jLL/Hth3jy5sVU8P4 8QDTqg1Wr5g0D7XE+yEuWAxwaX4= X-Google-Smtp-Source: AFSGD/V22DIg0leC4I1ensmRkeVqbXA3yhry+TAIgeb25Z6bHsJj+GonYZdJvZdPIEscjWxAW5WU6w== X-Received: by 2002:aca:d09d:: with SMTP id j29mr14590108oiy.262.1544039479527; Wed, 05 Dec 2018 11:51:19 -0800 (PST) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id k13sm25759879otj.19.2018.12.05.11.51.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 11:51:18 -0800 (PST) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Brown , linux-spi@vger.kernel.org Subject: [PATCH] SPI: Use of_node_name_eq for node name comparisons Date: Wed, 5 Dec 2018 13:50:41 -0600 Message-Id: <20181205195050.4759-25-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: Mark Brown Cc: linux-spi@vger.kernel.org Signed-off-by: Rob Herring --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 6ca59406b0b7..d27b6b0dee43 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1644,7 +1644,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, } if (spi_controller_is_slave(ctlr)) { - if (strcmp(nc->name, "slave")) { + if (!of_node_name_eq(nc, "slave")) { dev_err(&ctlr->dev, "%pOF is not called 'slave'\n", nc); return -EINVAL;