diff options
Diffstat (limited to 'drivers/char/drm/via_map.c')
-rw-r--r-- | drivers/char/drm/via_map.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/drm/via_map.c b/drivers/char/drm/via_map.c index 7fb9d2a2cce2..10091507a0dc 100644 --- a/drivers/char/drm/via_map.c +++ b/drivers/char/drm/via_map.c | |||
@@ -75,19 +75,15 @@ int via_do_cleanup_map(struct drm_device * dev) | |||
75 | return 0; | 75 | return 0; |
76 | } | 76 | } |
77 | 77 | ||
78 | int via_map_init(DRM_IOCTL_ARGS) | 78 | int via_map_init(struct drm_device *dev, void *data, struct drm_file *file_priv) |
79 | { | 79 | { |
80 | DRM_DEVICE; | 80 | drm_via_init_t *init = data; |
81 | drm_via_init_t init; | ||
82 | 81 | ||
83 | DRM_DEBUG("%s\n", __FUNCTION__); | 82 | DRM_DEBUG("%s\n", __FUNCTION__); |
84 | 83 | ||
85 | DRM_COPY_FROM_USER_IOCTL(init, (drm_via_init_t __user *) data, | 84 | switch (init->func) { |
86 | sizeof(init)); | ||
87 | |||
88 | switch (init.func) { | ||
89 | case VIA_INIT_MAP: | 85 | case VIA_INIT_MAP: |
90 | return via_do_init_map(dev, &init); | 86 | return via_do_init_map(dev, init); |
91 | case VIA_CLEANUP_MAP: | 87 | case VIA_CLEANUP_MAP: |
92 | return via_do_cleanup_map(dev); | 88 | return via_do_cleanup_map(dev); |
93 | } | 89 | } |
@@ -102,7 +98,7 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset) | |||
102 | 98 | ||
103 | dev_priv = drm_calloc(1, sizeof(drm_via_private_t), DRM_MEM_DRIVER); | 99 | dev_priv = drm_calloc(1, sizeof(drm_via_private_t), DRM_MEM_DRIVER); |
104 | if (dev_priv == NULL) | 100 | if (dev_priv == NULL) |
105 | return DRM_ERR(ENOMEM); | 101 | return -ENOMEM; |
106 | 102 | ||
107 | dev->dev_private = (void *)dev_priv; | 103 | dev->dev_private = (void *)dev_priv; |
108 | 104 | ||