From c5e849bddf24e39717e16599e5a25c082bc80f1f Mon Sep 17 00:00:00 2001 From: James Jones Date: Tue, 1 Jun 2021 17:35:27 -0700 Subject: [PATCH] gbm: Remove stat and refcount fields from gbm_device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These were unused. Signed-off-by: James Jones Reviewed-by: Michel Dänzer Reviewed-by: Emil Velikov Part-of: --- src/gbm/main/gbm.c | 6 +----- src/gbm/main/gbmint.h | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) 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,