summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/t20/t20.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2012-04-26 12:49:28 +0300
committerSimone Willett <swillett@nvidia.com>2012-05-08 11:59:29 -0700
commit03df341ccb7fdc227fc6011676435a8091fe368b (patch)
tree864418ae0079949c3457131a525004ac9a1fc5d9 /drivers/video/tegra/host/t20/t20.c
parent63cb7c537150248f16682af3f140d95f862ff729 (diff)
video: tegra: host: Iterate devices without nb_channels
Do not use nb_channels to find out the number of client devices. Instead, allocate devno regions when they are needed and find a device by module id by iterating over nvhost bus. Bug 871237 Change-Id: I53fd0d8e5874422ef9877430c0a170db2660118a Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/99067 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/t20/t20.c')
-rw-r--r--drivers/video/tegra/host/t20/t20.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/tegra/host/t20/t20.c b/drivers/video/tegra/host/t20/t20.c
index 19967cb8c7a4..3f90e6a837c9 100644
--- a/drivers/video/tegra/host/t20/t20.c
+++ b/drivers/video/tegra/host/t20/t20.c
@@ -202,7 +202,7 @@ struct nvhost_device *t20_get_nvhost_device(struct nvhost_master *host,
{
int i;
- for (i = 0; i < host->nb_channels; i++) {
+ for (i = 0; i < ARRAY_SIZE(t20_devices); i++) {
if (strcmp(t20_devices[i].name, name) == 0)
return &t20_devices[i];
}