Skip to content

Commit

Permalink
Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/airlied/drm-2.6

* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: DRM: fix memset size error
  drm: remove remnants of DRM_COPY_FROM/TO_USER_IOCTL
  drm: remove second forward decleration of drm device struct.
  • Loading branch information
Linus Torvalds committed Nov 6, 2007
2 parents f8a9efb + 246a3d1 commit 2658770
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
2 changes: 0 additions & 2 deletions drivers/char/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ struct drm_mm {
* a family of cards. There will one drm_device for each card present
* in this family
*/
struct drm_device;

struct drm_driver {
int (*load) (struct drm_device *, unsigned long flags);
int (*firstopen) (struct drm_device *);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/drm/drm_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ int drm_getstats(struct drm_device *dev, void *data,
struct drm_stats *stats = data;
int i;

memset(stats, 0, sizeof(stats));
memset(stats, 0, sizeof(*stats));

mutex_lock(&dev->struct_mutex);

Expand Down
8 changes: 0 additions & 8 deletions drivers/char/drm/drm_os_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)

#endif

/** For data going into the kernel through the ioctl argument */
#define DRM_COPY_FROM_USER_IOCTL(arg1, arg2, arg3) \
if ( copy_from_user(&arg1, arg2, arg3) ) \
return -EFAULT
/** For data going from the kernel through the ioctl argument */
#define DRM_COPY_TO_USER_IOCTL(arg1, arg2, arg3) \
if ( copy_to_user(arg1, &arg2, arg3) ) \
return -EFAULT
/** Other copying of data to kernel space */
#define DRM_COPY_FROM_USER(arg1, arg2, arg3) \
copy_from_user(arg1, arg2, arg3)
Expand Down
3 changes: 0 additions & 3 deletions drivers/char/drm/savage_bci.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,9 +968,6 @@ static int savage_bci_event_wait(struct drm_device *dev, void *data, struct drm_

DRM_DEBUG("\n");

DRM_COPY_FROM_USER_IOCTL(event, (drm_savage_event_wait_t __user *) data,
sizeof(event));

UPDATE_EVENT_COUNTER();
if (dev_priv->status_ptr)
hw_e = dev_priv->status_ptr[1] & 0xffff;
Expand Down

0 comments on commit 2658770

Please sign in to comment.