Deleted Added
full compact
savage_drv.c (183833) savage_drv.c (189563)
1/* savage_drv.c -- Savage DRI driver
2 */
3/*-
4 * Copyright 2005 Eric Anholt
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),

--- 13 unchanged lines hidden (view full) ---

22 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 *
25 * Authors:
26 * Eric Anholt <anholt@FreeBSD.org>
27 */
28
29#include <sys/cdefs.h>
1/* savage_drv.c -- Savage DRI driver
2 */
3/*-
4 * Copyright 2005 Eric Anholt
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),

--- 13 unchanged lines hidden (view full) ---

22 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 *
25 * Authors:
26 * Eric Anholt <anholt@FreeBSD.org>
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/dev/drm/savage_drv.c 183833 2008-10-13 18:03:27Z rnoland $");
30__FBSDID("$FreeBSD: head/sys/dev/drm/savage_drv.c 189563 2009-03-09 07:55:18Z rnoland $");
31
32#include "dev/drm/drmP.h"
33#include "dev/drm/drm.h"
34#include "dev/drm/savage_drm.h"
35#include "dev/drm/savage_drv.h"
36#include "dev/drm/drm_pciids.h"
37
38/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */

--- 22 unchanged lines hidden (view full) ---

61 dev->driver->desc = DRIVER_DESC;
62 dev->driver->date = DRIVER_DATE;
63 dev->driver->major = DRIVER_MAJOR;
64 dev->driver->minor = DRIVER_MINOR;
65 dev->driver->patchlevel = DRIVER_PATCHLEVEL;
66}
67
68static int
31
32#include "dev/drm/drmP.h"
33#include "dev/drm/drm.h"
34#include "dev/drm/savage_drm.h"
35#include "dev/drm/savage_drv.h"
36#include "dev/drm/drm_pciids.h"
37
38/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */

--- 22 unchanged lines hidden (view full) ---

61 dev->driver->desc = DRIVER_DESC;
62 dev->driver->date = DRIVER_DATE;
63 dev->driver->major = DRIVER_MAJOR;
64 dev->driver->minor = DRIVER_MINOR;
65 dev->driver->patchlevel = DRIVER_PATCHLEVEL;
66}
67
68static int
69savage_probe(device_t dev)
69savage_probe(device_t kdev)
70{
70{
71 return drm_probe(dev, savage_pciidlist);
71 return drm_probe(kdev, savage_pciidlist);
72}
73
74static int
72}
73
74static int
75savage_attach(device_t nbdev)
75savage_attach(device_t kdev)
76{
76{
77 struct drm_device *dev = device_get_softc(nbdev);
77 struct drm_device *dev = device_get_softc(kdev);
78
79 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
80 M_WAITOK | M_ZERO);
81
82 savage_configure(dev);
83
78
79 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
80 M_WAITOK | M_ZERO);
81
82 savage_configure(dev);
83
84 return drm_attach(nbdev, savage_pciidlist);
84 return drm_attach(kdev, savage_pciidlist);
85}
86
87static int
85}
86
87static int
88savage_detach(device_t nbdev)
88savage_detach(device_t kdev)
89{
89{
90 struct drm_device *dev = device_get_softc(nbdev);
90 struct drm_device *dev = device_get_softc(kdev);
91 int ret;
92
91 int ret;
92
93 ret = drm_detach(nbdev);
93 ret = drm_detach(kdev);
94
95 free(dev->driver, DRM_MEM_DRIVER);
96
97 return ret;
98}
99
100static device_method_t savage_methods[] = {
101 /* Device interface */

--- 20 unchanged lines hidden ---
94
95 free(dev->driver, DRM_MEM_DRIVER);
96
97 return ret;
98}
99
100static device_method_t savage_methods[] = {
101 /* Device interface */

--- 20 unchanged lines hidden ---