From patchwork Mon Jun 3 15:49:50 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: 165650 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4647040ili; Mon, 3 Jun 2019 08:54:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg1ytQ+dS8FxxSTPnV/MkSG636s1IMy+IGbUyNJbuTVjC5QEICYYjHq48QzQf5sE1O3jot X-Received: by 2002:a17:90a:7146:: with SMTP id g6mr30542321pjs.45.1559577252303; Mon, 03 Jun 2019 08:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577252; cv=none; d=google.com; s=arc-20160816; b=Wfajfuv2lvbBI48KW737N0d/tyaCIHdAG2DxXyxWf8klx/HrUvRd1vRUoAMkfHnzOP nRS1z3pPrFLXVbL6u7bIF75UFOSKBft+eSHD/PLgXqRM1lNFwMUwAJWCU6rVqnPe3eUJ dSkF3fL2IhXpjYJThsPMeI3zPhFRdQTW5BKKCfmV6C3oorCqZpQ63EYDJr5Dq2w5qJtS MZk1xVFBDNUyMlQ2NVezyNQRX7mg+MvJhcfvIBQgNwvUZt4wiMPmiUF/Vzhlcw8Oxf94 4LhelBYFyGYeqIlGmFF4RuCAfrX6d4GiKjPVWEr5me9FOCIwYJxjHUj6GQVFxwlikLDA 1Few== 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=HHT1i36tdOpkRbOol0DkgsOJzkmh4aJc0S//oAfH+0A=; b=PDyfIO359uEnJg0a3m3oS4POCe705xfN8VlQo1CzyoW+MsH1YIG2w6Ia/YN30dP0x1 QY5q2dgHV/hmwPhlD/Kp0PhPtbNd20TiSfI2W/eGepY66YFeChLuOiDFRds9o+AIyofj qza13A0pO7CU+Bx6NKAU2b4tY0qY+eoZlgWoLd8NRa1VY1dJpgiu8FIhpIM08f9IfgRr ZPR29Ca3B8I/jsDx+R4OZSfdpTexz2y9HiiB93EUUW/Ge5b8jCkpZbbNTpEjdLwMaDIH 5h21XFZsV9OcTbvKTt8fJNGHklMM4SStUJothTxUO79suuq2FhVufc5vzauVFf+AgdjE HpBQ== 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 u126si15462989pgu.117.2019.06.03.08.54.11; Mon, 03 Jun 2019 08:54:12 -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 S1729713AbfFCPyL (ORCPT + 30 others); Mon, 3 Jun 2019 11:54:11 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53766 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729210AbfFCPve (ORCPT ); Mon, 3 Jun 2019 11:51:34 -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 573D11A25; Mon, 3 Jun 2019 08:51:34 -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 620843F246; Mon, 3 Jun 2019 08:51:33 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com Subject: [RFC PATCH 24/57] drivers: staging: most-core: Use bus_find_device_by_name Date: Mon, 3 Jun 2019 16:49:50 +0100 Message-Id: <1559577023-558-25-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 bus_find_device_by_name() helper. Signed-off-by: Suzuki K Poulose --- drivers/staging/most/core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.7.4 diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c index 86a8545..b9841adb 100644 --- a/drivers/staging/most/core.c +++ b/drivers/staging/most/core.c @@ -561,13 +561,6 @@ static int split_string(char *buf, char **a, char **b, char **c, char **d) return 0; } -static int match_bus_dev(struct device *dev, void *data) -{ - char *mdev_name = data; - - return !strcmp(dev_name(dev), mdev_name); -} - /** * get_channel - get pointer to channel * @mdev: name of the device interface @@ -579,7 +572,7 @@ static struct most_channel *get_channel(char *mdev, char *mdev_ch) struct most_interface *iface; struct most_channel *c, *tmp; - dev = bus_find_device(&mc.bus, NULL, mdev, match_bus_dev); + dev = bus_find_device_by_name(&mc.bus, NULL, mdev); if (!dev) return NULL; iface = to_most_interface(dev);