Re: [PATCH 3/5] driver: provide sysfs interfaces to access TXT log

From: Greg KH
Date: Mon Apr 29 2013 - 10:02:01 EST


On Mon, Apr 29, 2013 at 04:47:41PM +0300, Andy Johnson wrote:
> Hello
>   
> >Oh, and NEVER use "raw" kobjects, by doing that, you know you are >doing
> something wrong in a driver.
>
> May I ask a short question  what do you mean by  "raw" kobjects? do you mean
> that 
>
> struct kobject *log_kobj;
>
> is a local variable inside a method and thus this is not 
>
> ok?

I mean "a driver should almost never touch a 'struct kobject' directly,
or define it as a variable to be used."

Use the driver core (i.e. 'struct device' and friends), and not 'struct
kobject'.

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/