Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163921
b: refs/heads/master
c: 327c225
h: refs/heads/master
i:
  163919: 19cfb3f
v: v3
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Aug 19, 2009
1 parent bbb91f2 commit 9a76c60
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0724fcf829e5afb66159ef68cb16a805ea11b42
refs/heads/master: 327c225bd548bf7871f116a0baa5ebdac884e452
25 changes: 25 additions & 0 deletions trunk/drivers/gpu/drm/drm_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/kdev_t.h>
#include <linux/err.h>

#include "drm_sysfs.h"
#include "drm_core.h"
#include "drmP.h"

Expand Down Expand Up @@ -515,3 +516,27 @@ void drm_sysfs_device_remove(struct drm_minor *minor)
{
device_unregister(&minor->kdev);
}


/**
* drm_class_device_register - Register a struct device in the drm class.
*
* @dev: pointer to struct device to register.
*
* @dev should have all relevant members pre-filled with the exception
* of the class member. In particular, the device_type member must
* be set.
*/

int drm_class_device_register(struct device *dev)
{
dev->class = drm_class;
return device_register(dev);
}
EXPORT_SYMBOL_GPL(drm_class_device_register);

void drm_class_device_unregister(struct device *dev)
{
return device_unregister(dev);
}
EXPORT_SYMBOL_GPL(drm_class_device_unregister);
12 changes: 12 additions & 0 deletions trunk/include/drm/drm_sysfs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef _DRM_SYSFS_H_
#define _DRM_SYSFS_H_

/**
* This minimalistic include file is intended for users (read TTM) that
* don't want to include the full drmP.h file.
*/

extern int drm_class_device_register(struct device *dev);
extern void drm_class_device_unregister(struct device *dev);

#endif

0 comments on commit 9a76c60

Please sign in to comment.