diff options
author | Jesse Barnes <jesse.barnes@intel.com> | 2007-11-22 14:02:38 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-02-07 15:09:38 +1000 |
commit | e8b962b6df50b74afed14af7f7a7d569b3ba70ac (patch) | |
tree | 4b40becefb49018a4b02a217673e44637040f4f6 /drivers/char/drm/drmP.h | |
parent | 8b40958032fd236194de57d29be9cf2c1f2643ee (diff) | |
download | linux-e8b962b6df50b74afed14af7f7a7d569b3ba70ac.tar.bz2 |
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.h | 11 |
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 { void (*postclose) (struct drm_device *, struct drm_file *); void (*lastclose) (struct drm_device *); int (*unload) (struct drm_device *); + int (*suspend) (struct drm_device *); + int (*resume) (struct drm_device *); int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv); void (*dma_ready) (struct drm_device *); int (*dma_quiescent) (struct drm_device *); @@ -643,6 +645,7 @@ struct drm_head { * may contain multiple heads. */ struct drm_device { + struct device dev; /**< Linux device */ char *unique; /**< Unique identifier: e.g., busid */ int unique_len; /**< Length of unique field */ char *devname; /**< For /proc/interrupts */ @@ -1063,11 +1066,11 @@ extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); /* sysfs support (drm_sysfs.c) */ +struct drm_sysfs_class; extern struct class *drm_sysfs_create(struct module *owner, char *name); -extern void drm_sysfs_destroy(struct class *cs); -extern struct class_device *drm_sysfs_device_add(struct class *cs, - struct drm_head *head); -extern void drm_sysfs_device_remove(struct class_device *class_dev); +extern void drm_sysfs_destroy(void); +extern int drm_sysfs_device_add(struct drm_device *dev, struct drm_head *head); +extern void drm_sysfs_device_remove(struct drm_device *dev); /* * Basic memory manager support (drm_mm.c) |