diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-06-26 18:17:23 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-06-26 18:17:23 +0000 |
commit | 0669fb3306ea473e9ddaaf9f82ba81844f054b02 (patch) | |
tree | 0b86f8ae37003fb865f6512e1f2aafe8d2e86f2a | |
parent | d451bd346083a51e422c67a4c80a4368ec81af41 (diff) |
Since we're not ifdefed anymore, change
drm_{open,close,poll,read,mmap,ioctl} into the form that cdev_decl()
likes, and nuke the #defines.
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 33 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_fops.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_vm.c | 2 |
4 files changed, 18 insertions, 29 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 237fe2ed70b..7d505c48ab3 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -153,17 +153,6 @@ extern drm_device_t *drm_units[]; /* Deal with netbsd code where only the print statements differ */ #define printk printf #define __unused /* nothing */ -/* - * cdev_decl() doesn't like underscore separated names. - * doing this here is easier that ifdefing each of them. - */ -#define drm_ioctl drmioctl -#define drm_open drmopen -#define drm_close drmclose -#define drm_read drmread -#define drm_poll drmpoll -#define drm_mmap drmmmap - #define DRM_IRQ_ARGS void *arg typedef int irqreturn_t; @@ -735,17 +724,17 @@ extern int drm_debug_flag; /* Device setup support (drm_drv.c) */ int drm_probe(struct pci_attach_args *, drm_pci_id_list_t * ); -void drm_attach(struct device *kdev, struct device *parent, - struct pci_attach_args *pa, drm_pci_id_list_t *idlist); -int drm_detach(struct device *self, int flags); -int drm_activate(struct device *self, enum devact act); -dev_type_ioctl(drm_ioctl); -dev_type_open(drm_open); -dev_type_close(drm_close); -dev_type_read(drm_read); -dev_type_poll(drm_poll); -dev_type_mmap(drm_mmap); -extern drm_local_map_t *drm_getsarea(drm_device_t *dev); +void drm_attach(struct device *, struct device *, + struct pci_attach_args *, drm_pci_id_list_t *); +int drm_detach(struct device *, int ); +int drm_activate(struct device *, enum devact); +dev_type_ioctl(drmioctl); +dev_type_open(drmopen); +dev_type_close(drmclose); +dev_type_read(drmread); +dev_type_poll(drmpoll); +dev_type_mmap(drmmmap); +extern drm_local_map_t *drm_getsarea(drm_device_t *); /* File operations helpers (drm_fops.c) */ int drm_open_helper(DRM_CDEV, int, int, diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 3f21301559a..98b24ffd423 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -485,7 +485,7 @@ drm_version(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_open(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) +drmopen(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) { drm_device_t *dev = NULL; int retcode = 0; @@ -512,7 +512,7 @@ drm_open(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) } int -drm_close(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) +drmclose(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) { drm_device_t *dev = drm_get_device_from_kdev(kdev); drm_file_t *file_priv; @@ -612,10 +612,10 @@ done: return retcode; } -/* drm_ioctl is called whenever a process performs an ioctl on /dev/drm. +/* drmioctl is called whenever a process performs an ioctl on /dev/drm. */ int -drm_ioctl(DRM_CDEV kdev, u_long cmd, caddr_t data, int flags, +drmioctl(DRM_CDEV kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p) { drm_device_t *dev = drm_get_device_from_kdev(kdev); diff --git a/sys/dev/pci/drm/drm_fops.c b/sys/dev/pci/drm/drm_fops.c index 3dcff9d8700..c83a0bf5620 100644 --- a/sys/dev/pci/drm/drm_fops.c +++ b/sys/dev/pci/drm/drm_fops.c @@ -114,13 +114,13 @@ drm_open_helper(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p, * on older X Servers (4.3.0 and earlier) */ int -drm_read(DRM_CDEV kdev, struct uio *uio, int ioflag) +drmread(DRM_CDEV kdev, struct uio *uio, int ioflag) { return 0; } int -drm_poll(DRM_CDEV kdev, int events, DRM_STRUCTPROC *p) +drmpoll(DRM_CDEV kdev, int events, DRM_STRUCTPROC *p) { return 0; } diff --git a/sys/dev/pci/drm/drm_vm.c b/sys/dev/pci/drm/drm_vm.c index be64d78b8c6..dae0b059307 100644 --- a/sys/dev/pci/drm/drm_vm.c +++ b/sys/dev/pci/drm/drm_vm.c @@ -29,7 +29,7 @@ #include "drm.h" paddr_t -drm_mmap(dev_t kdev, off_t offset, int prot) +drmmmap(dev_t kdev, off_t offset, int prot) { drm_device_t *dev = drm_get_device_from_kdev(kdev); drm_local_map_t *map; |