Message ID | 1559577023-558-19-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 q26csp4644257ili; Mon, 3 Jun 2019 08:51:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTkntB/PlsUn4EKcC4CoqOMeCy+Cy/0JNbCjLjsMzVHaBZyjPeQ3QJt1+tUWp7sbgAOFLG X-Received: by 2002:a17:90a:654b:: with SMTP id f11mr31253524pjs.34.1559577089990; Mon, 03 Jun 2019 08:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577089; cv=none; d=google.com; s=arc-20160816; b=0S35KmC/s3ZWhPSEktAaa9/FSejhhVFtw8URroIL1hmw+4qmi3zyzSEj4cWwgedcBh YKZngPcdD7oE1+behPd0YukDJ+oeTlT33MWKBsZKXWZjwVOpRTSbVGbPaXpqWxIh0Tns m1ymxxpth2mea5wY+ageTVohAyxkZBJCh3cGLjqRk6Z8/eHX0LV0UID2NVYlGIFaySCU DxzynzkqBr7LBTNSNda4iJMcpj3n+PqtMn0IUBATUQrco+zjs6MKsjed7Mh7XBsRVHbv brJ7rL0qB18TrkjZumOhzEkieZZqsTVzOuKKN6Hl1XPR7fx0B81i20zFmGLbD+OT/j4S JkXw== 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=qyhPrXjOxzDCJZ3hCmforHZ0TOXw4KhLSoc+quNQzkY=; b=ZjOckkUbUNNRcbtTN/fGmq731KGWywJM4Tf7+ha7YiqW6PEHfwoyqbjloDsQF/xXaV Tx2l9zE5/j9pwp/1jK7RXb+8C8/390ekOf6nE0EU9fz3HR4Cj0+W9PI54wiBbYEIBAeq YQ9xarJvH0Q4dJ40WHaE7SDDbFLPd0Erq2IbXDqd6eRhQjuVweayqRQN68YQ1Zp2DWBk HL5AoEVeagA4r6SPf8K3qGPq7n5hKbbZuJSDM9r2TjDQloejEQIKOJXtxjT4uT+oS5GL wyBc97DW5Jy0T+fY93y7pup4mpmmCDATj3ri4O9LsSZZBMPdXWZ3AIAVCefiXr/URqqM Rn0Q== 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 a3si19481007pff.117.2019.06.03.08.51.29; Mon, 03 Jun 2019 08:51:29 -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 S1729081AbfFCPv2 (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:51:28 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53706 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728963AbfFCPvZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:51:25 -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 4C7AD169E; Mon, 3 Jun 2019 08:51:25 -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 3375A3F246; Mon, 3 Jun 2019 08:51:24 -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, Alexander Shishkin <alexander.shishkin@linux.intel.com> Subject: [RFC PATCH 18/57] drivers: intel_th: Use bus_find_device_by_devt helper Date: Mon, 3 Jun 2019 16:49:44 +0100 Message-Id: <1559577023-558-19-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/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c index 033dce5..a85e236 100644 --- a/drivers/hwtracing/intel_th/core.c +++ b/drivers/hwtracing/intel_th/core.c @@ -789,13 +789,6 @@ static int intel_th_populate(struct intel_th *th) return 0; } -static int match_devt(struct device *dev, void *data) -{ - dev_t devt = (dev_t)(unsigned long)data; - - return dev->devt == devt; -} - static int intel_th_output_open(struct inode *inode, struct file *file) { const struct file_operations *fops; @@ -803,9 +796,7 @@ static int intel_th_output_open(struct inode *inode, struct file *file) struct device *dev; int err; - dev = bus_find_device(&intel_th_bus, NULL, - (void *)(unsigned long)inode->i_rdev, - match_devt); + dev = bus_find_device_by_devt(&intel_th_bus, NULL, inode->i_rdev); if (!dev || !dev->driver) return -ENODEV;
Switch to using the bus_find_device_by_devt helper Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/hwtracing/intel_th/core.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.7.4