[PATCH 2/5] drm: move drm_class into drm_sysfs.c

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 02:21:30PM +0200, David Herrmann wrote: > Right now, drm_sysfs_create() returns the newly allocated "struct class" > to the caller (which is drm_core_init()), which then has to set the > global variable 'drm_class'. During cleanup, though, we call > drm_sysfs_destroy() which

[PATCH 2/5] drm: move drm_class into drm_sysfs.c

2015-09-09 Thread David Herrmann
Right now, drm_sysfs_create() returns the newly allocated "struct class" to the caller (which is drm_core_init()), which then has to set the global variable 'drm_class'. During cleanup, though, we call drm_sysfs_destroy() which implicitly uses the global 'drm_class'. This is confusing, as ownership