UBI: remove ubi_devices_cnt

This global variablea is not really needed, remove it

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
Artem Bityutskiy
2007-12-16 13:01:03 +02:00
parent 06b68ba156
commit b96bf4c33d
3 changed files with 27 additions and 21 deletions

View File

@@ -60,7 +60,7 @@ static struct ubi_device *major_to_device(int major)
{
int i;
for (i = 0; i < ubi_devices_cnt; i++)
for (i = 0; i < UBI_MAX_DEVICES; i++)
if (ubi_devices[i] && MAJOR(ubi_devices[i]->cdev.dev) == major)
return ubi_devices[i];
BUG();