r128_misc.c revision 42a55b46
1/* 2 * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org 3 * 4 * Permission to use, copy, modify, distribute, and sell this software and its 5 * documentation for any purpose is hereby granted without fee, provided that 6 * the above copyright notice appear in all copies and that both that copyright 7 * notice and this permission notice appear in supporting documentation, and 8 * that the name of Marc Aurele La France not be used in advertising or 9 * publicity pertaining to distribution of the software without specific, 10 * written prior permission. Marc Aurele La France makes no representations 11 * about the suitability of this software for any purpose. It is provided 12 * "as-is" without express or implied warranty. 13 * 14 * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 16 * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20 * PERFORMANCE OF THIS SOFTWARE. 21 */ 22 23#ifdef HAVE_CONFIG_H 24#include "config.h" 25#endif 26 27#include "r128_version.h" 28 29#include "xf86.h" 30#include "r128.h" 31#include "r128_probe.h" 32 33/* Module loader interface for subsidiary driver module */ 34 35static XF86ModuleVersionInfo R128VersionRec = 36{ 37 R128_DRIVER_NAME, 38 MODULEVENDORSTRING, 39 MODINFOSTRING1, 40 MODINFOSTRING2, 41 XORG_VERSION_CURRENT, 42 PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, 43 ABI_CLASS_VIDEODRV, 44 ABI_VIDEODRV_VERSION, 45 MOD_CLASS_VIDEODRV, 46 {0, 0, 0, 0} 47}; 48 49/* 50 * R128Setup -- 51 * 52 * This function is called every time the module is loaded. 53 */ 54static pointer 55R128Setup 56( 57 pointer Module, 58 pointer Options, 59 int *ErrorMajor, 60 int *ErrorMinor 61) 62{ 63 static Bool Inited = FALSE; 64 65 if (!Inited) 66 { 67 Inited = TRUE; 68 xf86AddDriver(&R128, Module, HaveDriverFuncs); 69 } 70 71 return (pointer)TRUE; 72} 73 74/* The following record must be called r128ModuleData */ 75_X_EXPORT XF86ModuleData r128ModuleData = 76{ 77 &R128VersionRec, 78 R128Setup, 79 NULL 80}; 81