summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/intel_th/core.c
diff options
context:
space:
mode:
authorJacek Anaszewski <jacek.anaszewski@gmail.com>2019-07-30 23:36:31 +0300
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2019-07-30 23:36:31 +0300
commitbe7fc2cc86170bea31e1db8d596f35df52254971 (patch)
tree31ca140aec74decbf18dfce1a7869aeeb8dcbf84 /drivers/hwtracing/intel_th/core.c
parentaf7b65054952a9898534d966f2e548d7692b7016 (diff)
parent36f3313d6bff91ab2a9e47698c27d15363640a4e (diff)
downloadlinux-be7fc2cc86170bea31e1db8d596f35df52254971.tar.xz
Merge tag 'generic_lookup_helpers' into for-next
Generic Device Lookup Helpers Persistent tag for others to pull this branch from Based on patch series from Suzuki K Poulose <suzuki.poulose@arm.com> with Subject: [PATCH v3 0/7] drivers: Add generic device lookup helpers Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> * tag 'generic_lookup_helpers': platform: Add platform_find_device_by_driver() helper drivers: Add generic helper to match any device drivers: Introduce device lookup variants by ACPI_COMPANION device drivers: Introduce device lookup variants by device type drivers: Introduce device lookup variants by fwnode drivers: Introduce device lookup variants by of_node drivers: Introduce device lookup variants by name
Diffstat (limited to 'drivers/hwtracing/intel_th/core.c')
-rw-r--r--drivers/hwtracing/intel_th/core.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index 55922896d862..d5c1821b31c6 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -789,12 +789,6 @@ static int intel_th_populate(struct intel_th *th)
return 0;
}
-static int match_devt(struct device *dev, const void *data)
-{
- dev_t devt = (dev_t)(unsigned long)(void *)data;
- return dev->devt == devt;
-}
-
static int intel_th_output_open(struct inode *inode, struct file *file)
{
const struct file_operations *fops;
@@ -802,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, inode->i_rdev);
if (!dev || !dev->driver)
return -ENODEV;