From 5b38e134163cc375e91424c4688cc9328c6e9082 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 19 Jul 2007 17:11:11 -0700 Subject: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE. The data is now in kernel space, copied in/out as appropriate according to the This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DRM is lost. --- shared-core/nouveau_notifier.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'shared-core/nouveau_notifier.c') diff --git a/shared-core/nouveau_notifier.c b/shared-core/nouveau_notifier.c index 6a78bb23..24a306e8 100644 --- a/shared-core/nouveau_notifier.c +++ b/shared-core/nouveau_notifier.c @@ -128,29 +128,22 @@ nouveau_notifier_alloc(struct drm_device *dev, int channel, uint32_t handle, } int -nouveau_ioctl_notifier_alloc(DRM_IOCTL_ARGS) +nouveau_ioctl_notifier_alloc(struct drm_device *dev, void *data, struct drm_file *file_priv) { - DRM_DEVICE; - struct drm_nouveau_notifier_alloc na; + struct drm_nouveau_notifier_alloc *na = data; int ret; - DRM_COPY_FROM_USER_IOCTL(na, - (struct drm_nouveau_notifier_alloc __user*)data, - sizeof(na)); - - if (!nouveau_fifo_owner(dev, file_priv, na.channel)) { + if (!nouveau_fifo_owner(dev, file_priv, na->channel)) { DRM_ERROR("pid %d doesn't own channel %d\n", - DRM_CURRENTPID, na.channel); + DRM_CURRENTPID, na->channel); return -EPERM; } - ret = nouveau_notifier_alloc(dev, na.channel, na.handle, - na.count, &na.offset); + ret = nouveau_notifier_alloc(dev, na->channel, na->handle, + na->count, &na->offset); if (ret) return ret; - DRM_COPY_TO_USER_IOCTL((struct drm_nouveau_notifier_alloc __user*)data, - na, sizeof(na)); return 0; } -- cgit v1.2.3