gbm: remove left-over array
authorEric Engestrom <eric.engestrom@imgtec.com>
Tue, 13 Sep 2016 16:32:39 +0000 (17:32 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 14 Sep 2016 13:37:34 +0000 (14:37 +0100)
e7c8c85785b3a8f29e3f ("gbm: Removed unused function.") forgot to remove
the global array used only by that function.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gbm/main/gbm.c

index 1acbbcd06954cabeb632c999285ec32a7631d7a2..5a8e8b7b9f0db2e33adb0746caa79cfcb3f7f010 100644 (file)
 #include "gbmint.h"
 #include "backend.h"
 
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
-
-static struct gbm_device *devices[16];
-
-static int device_num = 0;
-
 /** Returns the file description for the gbm device
  *
  * \return The fd that the struct gbm_device was created with
@@ -127,9 +121,6 @@ gbm_create_device(int fd)
       return NULL;
    }
 
-   if (device_num == 0)
-      memset(devices, 0, sizeof devices);
-
    gbm = _gbm_create_device(fd);
    if (gbm == NULL)
       return NULL;
@@ -138,9 +129,6 @@ gbm_create_device(int fd)
    gbm->stat = buf;
    gbm->refcount = 1;
 
-   if (device_num < ARRAY_SIZE(devices)-1)
-      devices[device_num++] = gbm;
-
    return gbm;
 }