Message ID | 1559577023-558-20-git-send-email-suzuki.poulose@arm.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4644291ili; Mon, 3 Jun 2019 08:51:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQeHqLMtmKY8IXAlBcWhGAcLfUP5tAwXDaMIq3IGYJbRRu/2q9kR3CaaXhhbcU05SWv5cS X-Received: by 2002:a17:902:20e2:: with SMTP id v31mr30627384plg.138.1559577092332; Mon, 03 Jun 2019 08:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577092; cv=none; d=google.com; s=arc-20160816; b=0UhyqqBqc6sViYQmsK1yUcGL/xbqdj6Fv/nnY3+wz5nsVx4bBVsctWvsppMpwlqpd0 L+XiCKDXLGTRthxINZUHckPIFXQwdPXylsXBoFPszVTpZ0EqDbvZ9UxnlgGTdqmVW/ce GW1piekD8TM1kXbewtC3oqptLuapriYFYl268br41+aHTWYGA5Po1R9Ym5FARMpOSimM AXLu5/N4TkkD+k3f95vXB/pQPbMWUFUYCRTcEQZyD37lFViMivKX9H5aTbdQsDCcBDdg bkf+VpHhIsuGmzqUICPwFhnjqlpJT+7+cukpmwweNAedqhggLujZxsGM1e1DuPp8MlY6 2fEg== 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=imJIjri/YnCYfeFNwMLlfub7Tw7MWfP1cAfB0Wjijn0=; b=Idriug3kJVgHX6Mv5IExRAvZ4ofmUltocMtC9TVq61zCWLTO1MCrahurXUFp/8JQVw nZaf9IdP5Z23abCdv5mOg2y/8VVK6rujaZ7A+m/4MvK0maQmw8CGPabTVPuyNcSBSzDs g1TxrPrwzU17jz9KkJnpK7YtvJi/VDi96mLVFwOmgvacQnNAvunPkhMysctYRKK8anZK tTRLOAZ3AADVDKXd9MqsrcxUZfQMnoPHcV78LqAk/lAWf1oVDzqnBn93Gm0appBdHVg7 qu4FNPSjj7sFMl281PfS4P2KTqKI2Sy2sGmuGk1MSi/VvfxA+w9g5DZcET0QRoJBX/UB QZ2g== 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch7si14962581plb.21.2019.06.03.08.51.32; Mon, 03 Jun 2019 08:51:32 -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 S1729133AbfFCPvb (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:51:31 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53714 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729012AbfFCPv1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:51:27 -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 E90101715; Mon, 3 Jun 2019 08:51:26 -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 8984C3F246; Mon, 3 Jun 2019 08:51:25 -0700 (PDT) From: Suzuki K Poulose <suzuki.poulose@arm.com> To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Oliver Neukum <oneukum@suse.com>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, linux-usb@vger.kernel.org Subject: [RFC PATCH 19/57] drivers: usb: core: Use bus_find_device_by_devt helper Date: Mon, 3 Jun 2019 16:49:45 +0100 Message-Id: <1559577023-558-20-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[RFC,01/57] drivers: s390/cio: Use driver_for_each_device
|
expand
|
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index fa783531..28358a3 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -947,17 +947,11 @@ static int parse_usbdevfs_streams(struct usb_dev_state *ps, return ret; } -static int match_devt(struct device *dev, void *data) -{ - return dev->devt == (dev_t) (unsigned long) data; -} - static struct usb_device *usbdev_lookup_by_devt(dev_t devt) { struct device *dev; - dev = bus_find_device(&usb_bus_type, NULL, - (void *) (unsigned long) devt, match_devt); + dev = bus_find_device_by_devt(&usb_bus_type, NULL, devt); if (!dev) return NULL; return to_usb_device(dev);
Switch to using the bus_find_device_by_devt helper Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Oliver Neukum <oneukum@suse.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: linux-usb@vger.kernel.org Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/usb/core/devio.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4