diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c index e4c7d95f829..ce74738b1c9 100644 --- a/src/gbm/main/gbm.c +++ b/src/gbm/main/gbm.c @@ -106,9 +106,7 @@ gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm, GBM_EXPORT void gbm_device_destroy(struct gbm_device *gbm) { - gbm->refcount--; - if (gbm->refcount == 0) - gbm->destroy(gbm); + gbm->destroy(gbm); } /** Create a gbm device for allocating buffers @@ -139,8 +137,6 @@ gbm_create_device(int fd) return NULL; gbm->dummy = gbm_create_device; - gbm->stat = buf; - gbm->refcount = 1; return gbm; } diff --git a/src/gbm/main/gbmint.h b/src/gbm/main/gbmint.h index ded76793a2c..7514e03ffd7 100644 --- a/src/gbm/main/gbmint.h +++ b/src/gbm/main/gbmint.h @@ -29,7 +29,6 @@ #define INTERNAL_H_ #include "gbm.h" -#include /* GCC visibility */ #if defined(__GNUC__) @@ -54,8 +53,6 @@ struct gbm_device { int fd; const char *name; - unsigned int refcount; - struct stat stat; void (*destroy)(struct gbm_device *gbm); int (*is_format_supported)(struct gbm_device *gbm,