lkml.org 
[lkml]   [2004]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Dri-devel][PATCH] sysfs simple class support for DRI char device
On Fri, Mar 05, 2004 at 12:14:15PM -0800, Leann Ogasawara wrote:
> Hi All,
>
> Patch adds sysfs simple class support for DRI character device (Major
> 226). Also, adds some error checking. Feedback appreciated. Thanks,

Looks good, but...

>
> DRM_DEBUG("\n");
> - if (register_chrdev(DRM_MAJOR, "drm", &DRM(stub_fops)))
> + ret1 = register_chrdev(DRM_MAJOR, "drm", &DRM(stub_fops));
> + if (!ret1) {
> + drm_class = class_simple_create(THIS_MODULE, "drm");
> + if (IS_ERR(drm_class)) {
> + printk (KERN_ERR "Error creating drm class.\n");
> + unregister_chrdev(DRM_MAJOR, "drm");
> + return PTR_ERR(drm_class);
> + }
> + }
> + else if (ret1 == -EBUSY)
> i = (struct drm_stub_info *)inter_module_get("drm");
> + else
> + return -1;

If ret1 == -EBUSY then we never create the "drm" class_simple structure,
right? That's not good.

Care to fix this up and send a new patch?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:2.426 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site