]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: most-core: Use bus_find_device_by_name
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Fri, 14 Jun 2019 17:53:56 +0000 (18:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2019 03:22:30 +0000 (05:22 +0200)
Use bus_find_device_by_name() helper instead of writing our
own helper.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Christian Gromm <christian.gromm@microchip.com>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/core.c

index 86a8545c8d9740734ec3f15f89b2a66148792481..b9841adb7181bf28155f2950c891b7366e0256a8 100644 (file)
@@ -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);