aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuzuki K Poulose <[email protected]>2019-06-14 18:53:56 +0100
committerGreg Kroah-Hartman <[email protected]>2019-06-24 05:22:30 +0200
commit209de31034522fae53f789f52c9461c557011d70 (patch)
treea558a7c7c370cd3b0c1dd61f6f4edb3fb32d2ed6
parent65bbdd49b4722a09901469e57497850311c017dc (diff)
staging: most-core: Use bus_find_device_by_name
Use bus_find_device_by_name() helper instead of writing our own helper. Cc: Greg Kroah-Hartman <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Christian Gromm <[email protected]> Cc: "Gustavo A. R. Silva" <[email protected]> Cc: Colin Ian King <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/most/core.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index 86a8545c8d97..b9841adb7181 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);