From patchwork Fri Jun 14 17:53:56 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: 166876 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2352411ilk; Fri, 14 Jun 2019 10:54:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwoZIzGohHqkb+N0MtNLk3+KPlnJjvfuRenKFDYW1UQoQuxVpoXQnR+JKEl2tramxta4Bnm X-Received: by 2002:a63:151a:: with SMTP id v26mr3147914pgl.9.1560534889827; Fri, 14 Jun 2019 10:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560534889; cv=none; d=google.com; s=arc-20160816; b=B5QRD2/BTH+4wy9gqd/x9muJ/k23B/WYWDnV2ojmb1iQF08AB71G7zJURDzp5j4sGM BkgzEiQNiDtH4iSAYbVe0LWwE1emEaYqXRRPeL+gRHmsY94CtDdU3tumpz4ZAiApTK/I 1sjVUPvUOdm2uD296hIRhZT5v+0DB6xPlrLSjT+ng9zv2eKClGz0TWxIVEeo3Ds9cYEI jmh062CDAb2hOrcxWGkcXgM5bodQqhjp+placmPcACYzN65Rq5EdmtzVwolk+VmtNN2j w3CX29j46qIxTACGr/ksheCslVOjLZa1aeDK406nk1HctmVYgow7ghu35lvrRRQG2Kyl eb5w== 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=cmiRNRL4Z8Sa8uProqN91EswVc8qrR81ADs3tz2KlmU=; b=aT+TVXKh9LXN4R/3SWdN6ZCqTzhWSH7edk2sG+uhb1LN1PzGXHPFFf2L4MNmFtioIg YvKV3GPjgxPsv08bqTH6t1pjo984u1L+GuHK8mcaUTQeib4D19by1Z6rbTcthZbw+cEf B0FW0Zz1MzXhPDLmZHLiiDTcpc1cPiv8T+2gaS5zacSqiXlbHDKt1oXAQm/W9KMidEJc w9oT6ybRAHb7/eMAgSEhXwts/QeHh1HMTjwnZGMG9uwr6tXUdydeZcNRg6a3hsc+G2pu S1jsRduIIQ+dYU4/ql8h1GlQXjSCHB/SQxND59bfCzu8BXkAlRNkQRg5gou/JgCXYdZr Fk/w== 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 s18si2804363plp.128.2019.06.14.10.54.49; Fri, 14 Jun 2019 10:54:49 -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 S1727066AbfFNRyq (ORCPT + 17 others); Fri, 14 Jun 2019 13:54:46 -0400 Received: from foss.arm.com ([217.140.110.172]:39234 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbfFNRyp (ORCPT ); Fri, 14 Jun 2019 13:54:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F3577346; Fri, 14 Jun 2019 10:54:44 -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 F05FA3F718; Fri, 14 Jun 2019 10:54:43 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Christian Gromm , "Gustavo A. R. Silva" , Colin Ian King Subject: [PATCH v2 01/28] staging: most-core: Use bus_find_device_by_name Date: Fri, 14 Jun 2019 18:53:56 +0100 Message-Id: <1560534863-15115-2-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com> References: <1560534863-15115-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 instead of writing our own helper. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Christian Gromm Cc: "Gustavo A. R. Silva" Cc: Colin Ian King Signed-off-by: Suzuki K Poulose --- Hi, This patch can be split from the series. But it will eventually conflict with the series. Hence included it here. --- 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);