summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/t30
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/t30
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/t30')
-rw-r--r--drivers/video/tegra/host/t30/t30.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/tegra/host/t30/t30.c b/drivers/video/tegra/host/t30/t30.c
index fce8081df332..01009a708d19 100644
--- a/drivers/video/tegra/host/t30/t30.c
+++ b/drivers/video/tegra/host/t30/t30.c
@@ -221,7 +221,7 @@ struct nvhost_device *t30_get_nvhost_device(struct nvhost_master *host,
{
int i;
- for (i = 0; i < host->nb_channels; i++) {
+ for (i = 0; i < ARRAY_SIZE(t30_devices); i++) {
if (strcmp(t30_devices[i].name, name) == 0)
return &t30_devices[i];
}