From c2f80ecf4be09b5b9866d12e3b25cdcf7996b1f4 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 9 Nov 2007 18:08:08 +0100 Subject: suspend() and resume() need kernel 2.6.22 or later --- linux-core/drm_sysfs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux-core/drm_sysfs.c') diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c index 6f8623ce..caec120a 100644 --- a/linux-core/drm_sysfs.c +++ b/linux-core/drm_sysfs.c @@ -89,8 +89,10 @@ struct class *drm_sysfs_create(struct module *owner, char *name) goto err_out; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)) class->suspend = drm_sysfs_suspend; class->resume = drm_sysfs_resume; +#endif err = class_create_file(class, &class_attr_version); if (err) -- cgit v1.2.3 From 32c9a109b10c087f63964b4b055603feee522cc0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 29 Nov 2007 09:47:24 +1000 Subject: drm: enable udev node creation --- linux-core/drm_sysfs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'linux-core/drm_sysfs.c') diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c index caec120a..3aaac11b 100644 --- a/linux-core/drm_sysfs.c +++ b/linux-core/drm_sysfs.c @@ -162,12 +162,7 @@ int drm_sysfs_device_add(struct drm_device *dev, struct drm_head *head) dev->dev.parent = &dev->pdev->dev; dev->dev.class = drm_class; dev->dev.release = drm_sysfs_device_release; - /* - * This will actually add the major:minor file so that udev - * will create the device node. We don't want to do that just - * yet... - */ - /* dev->dev.devt = head->device; */ + dev->dev.devt = head->device; snprintf(dev->dev.bus_id, BUS_ID_SIZE, "card%d", head->minor); err = device_register(&dev->dev); -- cgit v1.2.3