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