sis_drv.c (183833) | sis_drv.c (189563) |
---|---|
1/* sis.c -- sis driver -*- linux-c -*- 2 */ 3/*- 4 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 6 * All Rights Reserved. 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a --- 13 unchanged lines hidden (view full) --- 22 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 * DEALINGS IN THE SOFTWARE. 26 * 27 */ 28 29#include <sys/cdefs.h> | 1/* sis.c -- sis driver -*- linux-c -*- 2 */ 3/*- 4 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 6 * All Rights Reserved. 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a --- 13 unchanged lines hidden (view full) --- 22 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 * DEALINGS IN THE SOFTWARE. 26 * 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/drm/sis_drv.c 183833 2008-10-13 18:03:27Z rnoland $"); | 30__FBSDID("$FreeBSD: head/sys/dev/drm/sis_drv.c 189563 2009-03-09 07:55:18Z rnoland $"); |
31 32#include "dev/drm/drmP.h" 33#include "dev/drm/sis_drm.h" 34#include "dev/drm/sis_drv.h" 35#include "dev/drm/drm_pciids.h" 36 37/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ 38static drm_pci_id_list_t sis_pciidlist[] = { --- 16 unchanged lines hidden (view full) --- 55 dev->driver->desc = DRIVER_DESC; 56 dev->driver->date = DRIVER_DATE; 57 dev->driver->major = DRIVER_MAJOR; 58 dev->driver->minor = DRIVER_MINOR; 59 dev->driver->patchlevel = DRIVER_PATCHLEVEL; 60} 61 62static int | 31 32#include "dev/drm/drmP.h" 33#include "dev/drm/sis_drm.h" 34#include "dev/drm/sis_drv.h" 35#include "dev/drm/drm_pciids.h" 36 37/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ 38static drm_pci_id_list_t sis_pciidlist[] = { --- 16 unchanged lines hidden (view full) --- 55 dev->driver->desc = DRIVER_DESC; 56 dev->driver->date = DRIVER_DATE; 57 dev->driver->major = DRIVER_MAJOR; 58 dev->driver->minor = DRIVER_MINOR; 59 dev->driver->patchlevel = DRIVER_PATCHLEVEL; 60} 61 62static int |
63sis_probe(device_t dev) | 63sis_probe(device_t kdev) |
64{ | 64{ |
65 return drm_probe(dev, sis_pciidlist); | 65 return drm_probe(kdev, sis_pciidlist); |
66} 67 68static int | 66} 67 68static int |
69sis_attach(device_t nbdev) | 69sis_attach(device_t kdev) |
70{ | 70{ |
71 struct drm_device *dev = device_get_softc(nbdev); | 71 struct drm_device *dev = device_get_softc(kdev); |
72 73 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, 74 M_WAITOK | M_ZERO); 75 76 sis_configure(dev); 77 | 72 73 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, 74 M_WAITOK | M_ZERO); 75 76 sis_configure(dev); 77 |
78 return drm_attach(nbdev, sis_pciidlist); | 78 return drm_attach(kdev, sis_pciidlist); |
79} 80 81static int | 79} 80 81static int |
82sis_detach(device_t nbdev) | 82sis_detach(device_t kdev) |
83{ | 83{ |
84 struct drm_device *dev = device_get_softc(nbdev); | 84 struct drm_device *dev = device_get_softc(kdev); |
85 int ret; 86 | 85 int ret; 86 |
87 ret = drm_detach(nbdev); | 87 ret = drm_detach(kdev); |
88 89 free(dev->driver, DRM_MEM_DRIVER); 90 91 return ret; 92} 93 94static device_method_t sis_methods[] = { 95 /* Device interface */ --- 20 unchanged lines hidden --- | 88 89 free(dev->driver, DRM_MEM_DRIVER); 90 91 return ret; 92} 93 94static device_method_t sis_methods[] = { 95 /* Device interface */ --- 20 unchanged lines hidden --- |