Re: class_device_find()

From: Greg KH
Date: Mon May 24 2004 - 18:42:11 EST


On Tue, May 25, 2004 at 02:08:03AM +0400, Andrew Zabolotny wrote:
> Ok, apart from this discussion, what you don't like about the
> class_device_find() function? I mean your fixed implementation. The locks are
> in place, the returned object has got his reference counter increased. Or,
> alternatively, any other ideas how we can solve the problem I've described in
> my previous message?

No in-kernel code uses it. That's my main objection. If a patch is
submitted that needs it, I'll reconsider it based on that patch.

> Also one more question. Do you think if it is okay if a subclass (such
> as the lcd device class) does strcpy() directly to class_device->class_id, or
> it is worth to add a function class_dev_set_name(struct class_device *, const
> char*)?

strncpy() is fine to do at this time.

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/