video: tegra: host: use strcmp in nvhost_bus_match
Mayuresh Kulkarni [Tue, 24 Jul 2012 07:17:24 +0000 (12:17 +0530)]
- replace the usage of strncmp with strcmp in
nvhost_bus_match()
- strncmp was needed when we had device name as
<name.ip-version>. but now the device name is <name>
which matches with the driver name.
- multiple devices get bind with the same driver using
id_table which uses .version field as an index in id_table

Change-Id: If0b6f0ee18626d5e7ff801b8515ef5168069c3f2
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/117953
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
(cherry picked from commit ece74a0888415460a005d52bcf2d5f6cf535597d)
Reviewed-on: http://git-master/r/123475
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

drivers/video/tegra/host/bus.c

index 758a5ca..f22dac2 100644 (file)
@@ -96,7 +96,7 @@ static int nvhost_bus_match(struct device *_dev, struct device_driver *drv)
        if (ndrv->id_table)
                return nvhost_bus_match_id(dev, ndrv->id_table) != NULL;
        else /* driver does not support id_table */
-               return !strncmp(dev->name, drv->name, strlen(drv->name));
+               return !strcmp(dev->name, drv->name);
 }
 
 static int nvhost_drv_probe(struct device *_dev)