]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/drm/drm_sysfs.c
I/OAT: fixups from code comments
[linux-2.6-omap-h63xx.git] / drivers / char / drm / drm_sysfs.c
index ba4b8de83cf0feda86f5d126534a56fd814fd33f..cf4349b00b07474f21fb6168a6bed2fa1a10a8a3 100644 (file)
@@ -45,8 +45,8 @@ struct class *drm_sysfs_create(struct module *owner, char *name)
        int err;
 
        class = class_create(owner, name);
-       if (!class) {
-               err = -ENOMEM;
+       if (IS_ERR(class)) {
+               err = PTR_ERR(class);
                goto err_out;
        }
 
@@ -80,7 +80,7 @@ void drm_sysfs_destroy(struct class *class)
 
 static ssize_t show_dri(struct class_device *class_device, char *buf)
 {
-       drm_device_t * dev = ((drm_head_t *)class_get_devdata(class_device))->dev;
+       struct drm_device * dev = ((struct drm_head *)class_get_devdata(class_device))->dev;
        if (dev->driver->dri_library_name)
                return dev->driver->dri_library_name(dev, buf);
        return snprintf(buf, PAGE_SIZE, "%s\n", dev->driver->pci_driver.name);
@@ -104,7 +104,7 @@ static struct class_device_attribute class_device_attrs[] = {
  * Note: the struct class passed to this function must have previously been
  * created with a call to drm_sysfs_create().
  */
-struct class_device *drm_sysfs_device_add(struct class *cs, drm_head_t *head)
+struct class_device *drm_sysfs_device_add(struct class *cs, struct drm_head *head)
 {
        struct class_device *class_dev;
        int i, j, err;
@@ -113,8 +113,8 @@ struct class_device *drm_sysfs_device_add(struct class *cs, drm_head_t *head)
                                        MKDEV(DRM_MAJOR, head->minor),
                                        &(head->dev->pdev)->dev,
                                        "card%d", head->minor);
-       if (!class_dev) {
-               err = -ENOMEM;
+       if (IS_ERR(class_dev)) {
+               err = PTR_ERR(class_dev);
                goto err_out;
        }