From a52d9c448e05253d8fc46eec1b2b2c80f0a7223a Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Mon, 23 Nov 2009 23:03:18 +0000 Subject: move the lastclose function into i915_drv.c where it belongs. kill some more dead protos while i'm touching the lines around them anyway. --- sys/dev/pci/drm/i915_dma.c | 13 +------------ sys/dev/pci/drm/i915_drv.c | 13 ++++++++++++- sys/dev/pci/drm/i915_drv.h | 7 +------ 3 files changed, 14 insertions(+), 19 deletions(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/drm/i915_dma.c b/sys/dev/pci/drm/i915_dma.c index 4e79f63ea4e..5e113abb926 100644 --- a/sys/dev/pci/drm/i915_dma.c +++ b/sys/dev/pci/drm/i915_dma.c @@ -77,7 +77,7 @@ void i915_free_hws(drm_i915_private_t *dev_priv, bus_dma_tag_t dmat) dev_priv->hw_status_page = NULL; } -static int i915_dma_cleanup(struct drm_device * dev) +int i915_dma_cleanup(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; @@ -630,14 +630,3 @@ int i915_set_status_page(struct drm_device *dev, void *data, return 0; } -void i915_driver_lastclose(struct drm_device * dev) -{ - drm_i915_private_t *dev_priv = dev->dev_private; - - if (dev_priv == NULL) - return; - - dev_priv->sarea_priv = NULL; - - i915_dma_cleanup(dev); -} diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 5dbe9bf574c..472f1647e66 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -40,6 +40,7 @@ void inteldrm_attach(struct device *, struct device *, void *); int inteldrm_detach(struct device *, int); int inteldrm_ioctl(struct drm_device *, u_long, caddr_t, struct drm_file *); int inteldrm_activate(struct device *, int); +void inteldrm_lastclose(struct drm_device *); void inteldrm_wrap_ring(struct drm_i915_private *); @@ -116,7 +117,7 @@ const static struct drm_pcidev inteldrm_pciidlist[] = { static const struct drm_driver_info inteldrm_driver = { .buf_priv_size = 1, /* No dev_priv */ .ioctl = inteldrm_ioctl, - .lastclose = i915_driver_lastclose, + .lastclose = inteldrm_lastclose, .vblank_pipes = 2, .get_vblank_counter = i915_get_vblank_counter, .enable_vblank = i915_enable_vblank, @@ -410,6 +411,16 @@ inteldrm_update_ring(struct drm_i915_private *dev_priv) ring->head, ring->tail, ring->space); } +void +inteldrm_lastclose(struct drm_device *dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + + dev_priv->sarea_priv = NULL; + + i915_dma_cleanup(dev); +} + /** * inteldrm_pipe_enabled - check if a pipe is enabled * @dev: DRM device diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h index eb1bf7ecaa7..3f52e270d5f 100644 --- a/sys/dev/pci/drm/i915_drv.h +++ b/sys/dev/pci/drm/i915_drv.h @@ -231,15 +231,10 @@ void inteldrm_update_ring(struct drm_i915_private *); int inteldrm_pipe_enabled(struct drm_i915_private *, int); /* i915_dma.c */ -extern void i915_driver_lastclose(struct drm_device * dev); -extern void i915_driver_close(struct drm_device *dev, - struct drm_file *file_priv); -extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg); extern void i915_emit_breadcrumb(struct drm_device *dev); -extern int i915_driver_firstopen(struct drm_device *dev); extern int i915_dispatch_batchbuffer(struct drm_device * dev, drm_i915_batchbuffer_t * batch); +int i915_dma_cleanup(struct drm_device *); int i915_init_phys_hws(drm_i915_private_t *, bus_dma_tag_t); void i915_free_hws(drm_i915_private_t *, bus_dma_tag_t); -- cgit v1.2.3