]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/drm/savage_drv.c
drm: convert drawable code to using idr
[linux-2.6-omap-h63xx.git] / drivers / char / drm / savage_drv.c
index 22d799cde41cb3fd3e1af3a3e6aaea41be6298a5..eee52aa92a7c9942fc937c377d684ea1bb799c7b 100644 (file)
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <linux/config.h>
 #include "drmP.h"
 #include "savage_drm.h"
 #include "savage_drv.h"
 
 #include "drm_pciids.h"
 
-static int postinit(struct drm_device *dev, unsigned long flags)
-{
-       DRM_INFO("Initialized %s %d.%d.%d %s on minor %d: %s\n",
-                DRIVER_NAME,
-                DRIVER_MAJOR,
-                DRIVER_MINOR,
-                DRIVER_PATCHLEVEL,
-                DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev)
-           );
-       return 0;
-}
-
-static int version(drm_version_t * version)
-{
-       int len;
-
-       version->version_major = DRIVER_MAJOR;
-       version->version_minor = DRIVER_MINOR;
-       version->version_patchlevel = DRIVER_PATCHLEVEL;
-       DRM_COPY(version->name, DRIVER_NAME);
-       DRM_COPY(version->date, DRIVER_DATE);
-       DRM_COPY(version->desc, DRIVER_DESC);
-       return 0;
-}
-
 static struct pci_device_id pciidlist[] = {
        savage_PCI_IDS
 };
@@ -63,13 +37,13 @@ static struct drm_driver driver = {
        .driver_features =
            DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_PCI_DMA,
        .dev_priv_size = sizeof(drm_savage_buf_priv_t),
-       .preinit = savage_preinit,
-       .postinit = postinit,
-       .postcleanup = savage_postcleanup,
+       .load = savage_driver_load,
+       .firstopen = savage_driver_firstopen,
+       .lastclose = savage_driver_lastclose,
+       .unload = savage_driver_unload,
        .reclaim_buffers = savage_reclaim_buffers,
        .get_map_ofs = drm_core_get_map_ofs,
        .get_reg_ofs = drm_core_get_reg_ofs,
-       .version = version,
        .ioctls = savage_ioctls,
        .dma_ioctl = savage_bci_buffers,
        .fops = {
@@ -80,12 +54,19 @@ static struct drm_driver driver = {
                 .mmap = drm_mmap,
                 .poll = drm_poll,
                 .fasync = drm_fasync,
-                }
-       ,
+       },
+
        .pci_driver = {
-                      .name = DRIVER_NAME,
-                      .id_table = pciidlist,
-                      }
+                .name = DRIVER_NAME,
+                .id_table = pciidlist,
+       },
+
+       .name = DRIVER_NAME,
+       .desc = DRIVER_DESC,
+       .date = DRIVER_DATE,
+       .major = DRIVER_MAJOR,
+       .minor = DRIVER_MINOR,
+       .patchlevel = DRIVER_PATCHLEVEL,
 };
 
 static int __init savage_init(void)