diff mbox

drm: Remove DRIVER_DATE and CORE_DATE

Message ID AANLkTinpis5BjiKk7pV-42vAHJVCcj_H6pKDJSqMOW9N@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sedat Dilek Jan. 3, 2011, 8:33 p.m. UTC
None
diff mbox

Patch

From c105fc3384ed411d92bb70f0cc54b38880d4d06d Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Sat, 1 Jan 2011 21:17:30 +0100
Subject: [PATCH] libdrm: Remove driver date from drm version calls


Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
 include/drm/drm.h  |    2 --
 tests/dristat.c    |    1 -
 tests/drmstat.c    |    1 -
 tests/getversion.c |    1 -
 xf86drm.c          |    9 ---------
 xf86drm.h          |    2 --
 6 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/include/drm/drm.h b/include/drm/drm.h
index 2ba7136..dac510a 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -131,8 +131,6 @@  struct drm_version {
 	int version_patchlevel;	  /**< Patch level */
 	size_t name_len;	  /**< Length of name buffer */
 	char *name;	  /**< Name of driver */
-	size_t date_len;	  /**< Length of date buffer */
-	char *date;	  /**< User-space buffer to hold date */
 	size_t desc_len;	  /**< Length of desc buffer */
 	char *desc;	  /**< User-space buffer to hold desc */
 };
diff --git a/tests/dristat.c b/tests/dristat.c
index 900a3e6..e493c83 100644
--- a/tests/dristat.c
+++ b/tests/dristat.c
@@ -53,7 +53,6 @@  static void getversion(int fd)
 	       version->version_major,
 	       version->version_minor,
 	       version->version_patchlevel);
-	printf("    Date: %s\n", version->date ? version->date : "?");
 	printf("    Desc: %s\n", version->desc ? version->desc : "?");
 	drmFreeVersion(version);
     } else {
diff --git a/tests/drmstat.c b/tests/drmstat.c
index 345b8d2..3250d2c 100644
--- a/tests/drmstat.c
+++ b/tests/drmstat.c
@@ -72,7 +72,6 @@  static void getversion(int fd)
 		version->version_major,
 		version->version_minor,
 		version->version_patchlevel );
-	printf( "    Date: %s\n", version->date ? version->date : "?" );
 	printf( "    Desc: %s\n", version->desc ? version->desc : "?" );
 	drmFreeVersion(version);
     } else {
diff --git a/tests/getversion.c b/tests/getversion.c
index 711d376..82084b7 100644
--- a/tests/getversion.c
+++ b/tests/getversion.c
@@ -38,7 +38,6 @@  int main(int argc, char **argv)
 	fd = drm_open_any();
 	v = drmGetVersion(fd);
 	assert(strlen(v->name) != 0);
-	assert(strlen(v->date) != 0);
 	assert(strlen(v->desc) != 0);
 	if (strcmp(v->name, "i915") == 0)
 		assert(v->version_major >= 1);
diff --git a/xf86drm.c b/xf86drm.c
index 799fcdd..81a8a39 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -669,7 +669,6 @@  void drmFreeVersion(drmVersionPtr v)
     if (!v)
 	return;
     drmFree(v->name);
-    drmFree(v->date);
     drmFree(v->desc);
     drmFree(v);
 }
@@ -689,7 +688,6 @@  static void drmFreeKernelVersion(drm_version_t *v)
     if (!v)
 	return;
     drmFree(v->name);
-    drmFree(v->date);
     drmFree(v->desc);
     drmFree(v);
 }
@@ -712,8 +710,6 @@  static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s)
     d->version_patchlevel = s->version_patchlevel;
     d->name_len           = s->name_len;
     d->name               = strdup(s->name);
-    d->date_len           = s->date_len;
-    d->date               = strdup(s->date);
     d->desc_len           = s->desc_len;
     d->desc               = strdup(s->desc);
 }
@@ -741,8 +737,6 @@  drmVersionPtr drmGetVersion(int fd)
 
     version->name_len    = 0;
     version->name        = NULL;
-    version->date_len    = 0;
-    version->date        = NULL;
     version->desc_len    = 0;
     version->desc        = NULL;
 
@@ -753,8 +747,6 @@  drmVersionPtr drmGetVersion(int fd)
 
     if (version->name_len)
 	version->name    = drmMalloc(version->name_len + 1);
-    if (version->date_len)
-	version->date    = drmMalloc(version->date_len + 1);
     if (version->desc_len)
 	version->desc    = drmMalloc(version->desc_len + 1);
 
@@ -766,7 +758,6 @@  drmVersionPtr drmGetVersion(int fd)
 
     /* The results might not be null-terminated strings, so terminate them. */
     if (version->name_len) version->name[version->name_len] = '\0';
-    if (version->date_len) version->date[version->date_len] = '\0';
     if (version->desc_len) version->desc[version->desc_len] = '\0';
 
     retval = drmMalloc(sizeof(*retval));
diff --git a/xf86drm.h b/xf86drm.h
index 9b89f56..afbd819 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -115,8 +115,6 @@  typedef struct _drmVersion {
     int     version_patchlevel;   /**< Patch level */
     int     name_len; 	          /**< Length of name buffer */
     char    *name;	          /**< Name of driver */
-    int     date_len;             /**< Length of date buffer */
-    char    *date;                /**< User-space buffer to hold date */
     int     desc_len;	          /**< Length of desc buffer */
     char    *desc;                /**< User-space buffer to hold desc */
 } drmVersion, *drmVersionPtr;
-- 
1.7.4.rc0