From ece74a0888415460a005d52bcf2d5f6cf535597d Mon Sep 17 00:00:00 2001 From: Mayuresh Kulkarni Date: Tue, 24 Jul 2012 12:47:24 +0530 Subject: video: tegra: host: use strcmp in nvhost_bus_match - replace the usage of strncmp with strcmp in nvhost_bus_match() - strncmp was needed when we had device name as . but now the device name is 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 Reviewed-on: http://git-master/r/117953 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ken Adams Reviewed-by: Terje Bergstrom --- drivers/video/tegra/host/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/tegra/host/bus.c b/drivers/video/tegra/host/bus.c index 758a5ca4ad94..f22dac288051 100644 --- a/drivers/video/tegra/host/bus.c +++ b/drivers/video/tegra/host/bus.c @@ -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) -- cgit v1.2.3