From: Dave Airlie Date: Mon, 7 Feb 2005 11:20:43 +0000 (+0000) Subject: change DRIVER_ to CORE_ makes things look nicer, also change it so the X-Git-Tag: libdrm-1_0_0~125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03ddea5b274a515528ea58db62f7b5f779430c5b;p=platform%2Fupstream%2Flibdrm.git change DRIVER_ to CORE_ makes things look nicer, also change it so the driver name is marked on resource allocations --- diff --git a/linux-core/drm_core.h b/linux-core/drm_core.h index 33b14cc..ff76497 100644 --- a/linux-core/drm_core.h +++ b/linux-core/drm_core.h @@ -23,15 +23,15 @@ * DEALINGS IN THE SOFTWARE. */ -#define DRIVER_AUTHOR "Gareth Hughes, Leif Delgass, José Fonseca, Jon Smirl" +#define CORE_AUTHOR "Gareth Hughes, Leif Delgass, José Fonseca, Jon Smirl" -#define DRIVER_NAME "drm" -#define DRIVER_DESC "DRM shared core routines" -#define DRIVER_DATE "20040925" +#define CORE_NAME "drm" +#define CORE_DESC "DRM shared core routines" +#define CORE_DATE "20040925" #define DRM_IF_MAJOR 1 #define DRM_IF_MINOR 2 -#define DRIVER_MAJOR 1 -#define DRIVER_MINOR 0 -#define DRIVER_PATCHLEVEL 0 +#define CORE_MAJOR 1 +#define CORE_MINOR 0 +#define CORE_PATCHLEVEL 0 diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index c720f94..60020bb 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -15,10 +15,6 @@ * #define DRIVER_DESC "Matrox G200/G400" * #define DRIVER_DATE "20001127" * - * #define DRIVER_MAJOR 2 - * #define DRIVER_MINOR 0 - * #define DRIVER_PATCHLEVEL 2 - * * #define DRIVER_IOCTL_COUNT DRM_ARRAY_SIZE( mga_ioctls ) * * #define drm_x mga_##x @@ -502,8 +498,8 @@ static int __init drm_core_init(void) } DRM_INFO("Initialized %s %d.%d.%d %s\n", - DRIVER_NAME, - DRIVER_MAJOR, DRIVER_MINOR, DRIVER_PATCHLEVEL, DRIVER_DATE); + CORE_NAME, + CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE); return 0; err_p3: drm_sysfs_destroy(drm_class); diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c index 207189f..2165dc5 100644 --- a/linux-core/drm_stub.c +++ b/linux-core/drm_stub.c @@ -41,8 +41,8 @@ unsigned int cards_limit = 16; /* Enough for one machine */ unsigned int drm_debug = 0; /* 1 to enable debug output */ EXPORT_SYMBOL(drm_debug); -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_AUTHOR(CORE_AUTHOR); +MODULE_DESCRIPTION(CORE_DESC); MODULE_LICENSE("GPL and additional rights"); MODULE_PARM_DESC(cards_limit, "Maximum number of graphics cards"); MODULE_PARM_DESC(drm_debug, "Enable debug output"); @@ -154,7 +154,7 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, if (!drm_fb_loaded) { pci_set_drvdata(pdev, dev); - pci_request_regions(pdev, DRIVER_NAME); + pci_request_regions(pdev, driver->pci_driver.name); pci_enable_device(pdev); } if ((ret = fill_in_dev(dev, pdev, ent, driver))) { diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c index 85edcfc..405ba44 100644 --- a/linux-core/drm_sysfs.c +++ b/linux-core/drm_sysfs.c @@ -55,8 +55,8 @@ static void drm_sysfs_class_release(struct class *class) /* Display the version of drm_core. This doesn't work right in current design */ static ssize_t version_show(struct class *dev, char *buf) { - return sprintf(buf, "%s %d.%d.%d %s\n", DRIVER_NAME, DRIVER_MAJOR, - DRIVER_MINOR, DRIVER_PATCHLEVEL, DRIVER_DATE); + return sprintf(buf, "%s %d.%d.%d %s\n", CORE_NAME, CORE_MAJOR, + CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE); } static CLASS_ATTR(version, S_IRUGO, version_show, NULL);