From patchwork Mon Jun 3 15:49:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 165606 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4643979ili; Mon, 3 Jun 2019 08:51:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVkdTS/o9nZKjZlHune1hpia3eOB60j9ZwQLi8ChoB8Jg959ci6fnCFKm9U7cBIx1Ynmgq X-Received: by 2002:a17:902:2847:: with SMTP id e65mr28916725plb.319.1559577073929; Mon, 03 Jun 2019 08:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577073; cv=none; d=google.com; s=arc-20160816; b=kDXHbzO/NP6hfxZiWR2giqLR+CBYaJkUeQCcDURpx2gAvTEikes2R/Vcp96cDjHvbI pOjLxuWnCYbuueCArcoo2n7DSRqHxDBZVdAfISvfg60pwM4f+bng1/Nr6mGZJfBcclAn aODknJy/XTm3+0O4LNmoFVPCslc0k6lAZTUfWcIdm/ArFce5oVkCW68NJ5+QKsl+6rzi fyOM1JZVRzqFsIdX6joMHD1buUwUwooMRhuvhoUSOkQoOuCgyXE9PXOBX2nSBa6SnJ2h tles04zL+dsyAeqZ3/3fGdrquuLNblZACOLNPaEj+iQlulbpIGX4+83AV8fwolGmffhE 74CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=qW+JWa6tOmZGi+1pMHNYWcrq6F1h81iikDz7HiwwIRo=; b=CbNJyOLIJVVx/TFGXK5RvnbF/fEeSgrVWC6zvIoLwm8rMFgUXMMIxtpUgna2QqiwTu u2kB0PBuMpgbPaa3DMQr0ucLmmt5ZLNLgD0NG64QI9sNnyhI64itnnLe/ubmDodVHq2t siILiuj+CaHSFyEixz/paNkfbS3YI4NkAIpM3EdYmPts7di+sZ9oeU40bQ7CEh5GjFdw bDViiP5EgkaNeTA56XdgXgaHRryXQGdiqZOOnZhhpx6AZ2TQukX84ioExdIVH4zIOS77 YXlim/cnoAE7IVGnAwNzRHB/98DW+njKPYDRCOzxVuN3kU/ihUEueSxZWkgS6wznM8Yc g7KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g69si20591014plb.70.2019.06.03.08.51.13; Mon, 03 Jun 2019 08:51:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728579AbfFCPvN (ORCPT + 30 others); Mon, 3 Jun 2019 11:51:13 -0400 Received: from foss.arm.com ([217.140.101.70]:53590 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728412AbfFCPvJ (ORCPT ); Mon, 3 Jun 2019 11:51:09 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 18B8B15AB; Mon, 3 Jun 2019 08:51:09 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0093B3F246; Mon, 3 Jun 2019 08:51:07 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Srinivas Kandagatla Subject: [RFC PATCH 07/57] drivers: nvmem: Use bus_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:49:33 +0100 Message-Id: <1559577023-558-8-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to using the bus_find_device_by_of_node helper Cc: Srinivas Kandagatla Signed-off-by: Suzuki K Poulose --- drivers/nvmem/core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index c7892c3..63947d3 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -76,11 +76,6 @@ static struct bus_type nvmem_bus_type = { .name = "nvmem", }; -static int of_nvmem_match(struct device *dev, void *nvmem_np) -{ - return dev->of_node == nvmem_np; -} - static struct nvmem_device *of_nvmem_find(struct device_node *nvmem_np) { struct device *d; @@ -88,7 +83,7 @@ static struct nvmem_device *of_nvmem_find(struct device_node *nvmem_np) if (!nvmem_np) return NULL; - d = bus_find_device(&nvmem_bus_type, NULL, nvmem_np, of_nvmem_match); + d = bus_find_device_by_of_node(&nvmem_bus_type, NULL, nvmem_np); if (!d) return NULL;