aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/drm/drmP.h2
-rw-r--r--drivers/char/drm/drm_ioctl.c2
-rw-r--r--drivers/char/drm/drm_os_linux.h8
-rw-r--r--drivers/char/drm/savage_bci.c3
4 files changed, 1 insertions, 14 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index 9dd0760dd87a..dde02a15fa59 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -559,8 +559,6 @@ struct drm_mm {
559 * a family of cards. There will one drm_device for each card present 559 * a family of cards. There will one drm_device for each card present
560 * in this family 560 * in this family
561 */ 561 */
562struct drm_device;
563
564struct drm_driver { 562struct drm_driver {
565 int (*load) (struct drm_device *, unsigned long flags); 563 int (*load) (struct drm_device *, unsigned long flags);
566 int (*firstopen) (struct drm_device *); 564 int (*firstopen) (struct drm_device *);
diff --git a/drivers/char/drm/drm_ioctl.c b/drivers/char/drm/drm_ioctl.c
index d9be14624526..3cbebf868e68 100644
--- a/drivers/char/drm/drm_ioctl.c
+++ b/drivers/char/drm/drm_ioctl.c
@@ -272,7 +272,7 @@ int drm_getstats(struct drm_device *dev, void *data,
272 struct drm_stats *stats = data; 272 struct drm_stats *stats = data;
273 int i; 273 int i;
274 274
275 memset(stats, 0, sizeof(stats)); 275 memset(stats, 0, sizeof(*stats));
276 276
277 mutex_lock(&dev->struct_mutex); 277 mutex_lock(&dev->struct_mutex);
278 278
diff --git a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h
index 76e44ac94fb5..daa69c9d8977 100644
--- a/drivers/char/drm/drm_os_linux.h
+++ b/drivers/char/drm/drm_os_linux.h
@@ -62,14 +62,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)
62 62
63#endif 63#endif
64 64
65/** For data going into the kernel through the ioctl argument */
66#define DRM_COPY_FROM_USER_IOCTL(arg1, arg2, arg3) \
67 if ( copy_from_user(&arg1, arg2, arg3) ) \
68 return -EFAULT
69/** For data going from the kernel through the ioctl argument */
70#define DRM_COPY_TO_USER_IOCTL(arg1, arg2, arg3) \
71 if ( copy_to_user(arg1, &arg2, arg3) ) \
72 return -EFAULT
73/** Other copying of data to kernel space */ 65/** Other copying of data to kernel space */
74#define DRM_COPY_FROM_USER(arg1, arg2, arg3) \ 66#define DRM_COPY_FROM_USER(arg1, arg2, arg3) \
75 copy_from_user(arg1, arg2, arg3) 67 copy_from_user(arg1, arg2, arg3)
diff --git a/drivers/char/drm/savage_bci.c b/drivers/char/drm/savage_bci.c
index 59484d56b333..d465b2f9c1cd 100644
--- a/drivers/char/drm/savage_bci.c
+++ b/drivers/char/drm/savage_bci.c
@@ -968,9 +968,6 @@ static int savage_bci_event_wait(struct drm_device *dev, void *data, struct drm_
968 968
969 DRM_DEBUG("\n"); 969 DRM_DEBUG("\n");
970 970
971 DRM_COPY_FROM_USER_IOCTL(event, (drm_savage_event_wait_t __user *) data,
972 sizeof(event));
973
974 UPDATE_EVENT_COUNTER(); 971 UPDATE_EVENT_COUNTER();
975 if (dev_priv->status_ptr) 972 if (dev_priv->status_ptr)
976 hw_e = dev_priv->status_ptr[1] & 0xffff; 973 hw_e = dev_priv->status_ptr[1] & 0xffff;