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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user