aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2007-11-21 23:02:38 -0500
committerDave Airlie <airlied@redhat.com>2008-02-07 00:09:38 -0500
commite8b962b6df50b74afed14af7f7a7d569b3ba70ac (patch)
tree4b40becefb49018a4b02a217673e44637040f4f6 /drivers/char/drm/drmP.h
parent8b40958032fd236194de57d29be9cf2c1f2643ee (diff)
drm: update DRM sysfs support
Make DRM devices use real Linux devices instead of class devices, which are going away. While we're at it, clean up some of the interfaces to take struct drm_device * or struct device * and use the global drm_class where needed instead of passing it around. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r--drivers/char/drm/drmP.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index 36caf93db309..19d3be5c4b2d 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -568,6 +568,8 @@ struct drm_driver {
568 void (*postclose) (struct drm_device *, struct drm_file *); 568 void (*postclose) (struct drm_device *, struct drm_file *);
569 void (*lastclose) (struct drm_device *); 569 void (*lastclose) (struct drm_device *);
570 int (*unload) (struct drm_device *); 570 int (*unload) (struct drm_device *);
571 int (*suspend) (struct drm_device *);
572 int (*resume) (struct drm_device *);
571 int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv); 573 int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
572 void (*dma_ready) (struct drm_device *); 574 void (*dma_ready) (struct drm_device *);
573 int (*dma_quiescent) (struct drm_device *); 575 int (*dma_quiescent) (struct drm_device *);
@@ -643,6 +645,7 @@ struct drm_head {
643 * may contain multiple heads. 645 * may contain multiple heads.
644 */ 646 */
645struct drm_device { 647struct drm_device {
648 struct device dev; /**< Linux device */
646 char *unique; /**< Unique identifier: e.g., busid */ 649 char *unique; /**< Unique identifier: e.g., busid */
647 int unique_len; /**< Length of unique field */ 650 int unique_len; /**< Length of unique field */
648 char *devname; /**< For /proc/interrupts */ 651 char *devname; /**< For /proc/interrupts */
@@ -1063,11 +1066,11 @@ extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
1063extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); 1066extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
1064 1067
1065 /* sysfs support (drm_sysfs.c) */ 1068 /* sysfs support (drm_sysfs.c) */
1069struct drm_sysfs_class;
1066extern struct class *drm_sysfs_create(struct module *owner, char *name); 1070extern struct class *drm_sysfs_create(struct module *owner, char *name);
1067extern void drm_sysfs_destroy(struct class *cs); 1071extern void drm_sysfs_destroy(void);
1068extern struct class_device *drm_sysfs_device_add(struct class *cs, 1072extern int drm_sysfs_device_add(struct drm_device *dev, struct drm_head *head);
1069 struct drm_head *head); 1073extern void drm_sysfs_device_remove(struct drm_device *dev);
1070extern void drm_sysfs_device_remove(struct class_device *class_dev);
1071 1074
1072/* 1075/*
1073 * Basic memory manager support (drm_mm.c) 1076 * Basic memory manager support (drm_mm.c)