Re: [Dri-devel][PATCH] sysfs simple class support for DRI char device

From: Greg KH
Date: Thu Mar 11 2004 - 20:08:28 EST


On Thu, Mar 11, 2004 at 10:52:21AM -0800, Greg KH wrote:
> > 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?

In talking about this on irc, I agree I was wrong. I'll go apply this
patch now.

thanks,

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