From patchwork Mon Jun 3 15:50:05 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: 165621 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4644810ili; Mon, 3 Jun 2019 08:52:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuk6lQ3VL42t4qsNMUDJPDV5Ounued99wLZI8r+d47O6kNYjHq+VDEuFGIpCiJrWw0dXnM X-Received: by 2002:a63:6603:: with SMTP id a3mr22057724pgc.239.1559577123066; Mon, 03 Jun 2019 08:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577123; cv=none; d=google.com; s=arc-20160816; b=VJZf4PI0Q9O3FhLdun6oqoD8jV3m0H8VofFO2nobU14EzeGfi/AbAZzfcLrxGrtLsJ b6seTDkMfmP4GoZP1G3ijJCnJDcwqV/Z06yaUA6K+V8YSgTAtyLSevq7liX+5UIsB64t 6ciW8s+HPhWvqsLDyj+0zk/8ACi96WbGQxTpcbQY/MNQFIDgOrKmvexUwYlckrIC2pkU Xq0Bvz69N4AtuhdkCxdN+TtI4dm9JEa23ng/3/dPhvX6888Ersqv75kvwpuuPuT2kevS Ijc2MBQgqdRP2XakNRz6ZyFnBtH3CUbVHe71kXGKuBr94OklssNKrTSkRv7f858VmYtW sXTw== 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=G4+WSz9jzJ5Qp71EIKD9JlLG4WOe0b82KGCoGgQzwEc=; b=j7SiYhDV+neCE3CCc5B/pJ8iq43u26RBXF9d3HCsYp64c+ZL/oSeFtK5oO76xbaHCA wGD+yMACRwXUgLyqT3FnmlZM0qtTscUwKF6x7v47bl7PTeTLa+pV3pNQ1wXm2dqj+BZ8 HPpT/JgWFwaBBTqsG67o2y2WG+DPq/TIimOEe5dStBnqRjpuZsC6zIMY5jIJzNdv8Zoy L2Ji1zqZ1YLloHFjyChRVdY0wt70ynapij2EKHkmvdd1ioLc9fck7wPv1uZ8v6SDAoYp jn1r01v/jqS2AG7MJFwYPp9peYNnJyVwPJzJ+5cAgCGQmNeoT9cNzqDs17UfvkjRDYeU U4Jw== 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 v20si19320578pgk.58.2019.06.03.08.52.02; Mon, 03 Jun 2019 08:52:03 -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 S1729481AbfFCPwC (ORCPT + 30 others); Mon, 3 Jun 2019 11:52:02 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53946 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729455AbfFCPv7 (ORCPT ); Mon, 3 Jun 2019 11:51:59 -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 A74A51A25; Mon, 3 Jun 2019 08:51:58 -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 8F18E3F246; Mon, 3 Jun 2019 08:51:57 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Peter Rosin Subject: [RFC PATCH 39/57] drivers: mux: Use class_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:50:05 +0100 Message-Id: <1559577023-558-40-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 Use the generic helper to find a device matching the of_node. Cc: Peter Rosin Signed-off-by: Suzuki K Poulose --- drivers/mux/core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4 Reviewed-by: Peter Rosin diff --git a/drivers/mux/core.c b/drivers/mux/core.c index d1271c1..3591e40 100644 --- a/drivers/mux/core.c +++ b/drivers/mux/core.c @@ -405,18 +405,12 @@ int mux_control_deselect(struct mux_control *mux) } EXPORT_SYMBOL_GPL(mux_control_deselect); -static int of_dev_node_match(struct device *dev, const void *data) -{ - return dev->of_node == data; -} - /* Note this function returns a reference to the mux_chip dev. */ static struct mux_chip *of_find_mux_chip_by_node(struct device_node *np) { struct device *dev; - dev = class_find_device(&mux_class, NULL, np, of_dev_node_match); - + dev = class_find_device_by_of_node(&mux_class, NULL, np); return dev ? to_mux_chip(dev) : NULL; }