lkml.org 
[lkml]   [2008]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 12/21] perfmon2 minimal: sysfs interface
On Thu, Jun 12, 2008 at 02:54:15PM +0200, stephane eranian wrote:
> Greg,
>
> I looked at the documentation and the examples.
>
> Find attached an updated version of the perfmon-sysfs.diff patch.
>
> I have grouped attribute functions into common show/store functions
> with a strcmp on
> the attribute name. I have also used the kobject_init_and_add() function.
>
> Once thing still confusing to me is the business with kobject_put()
> after a kobject_init_and_add().
> Is that necessary to drop the ref count to zero?

Yes.

> Also when you link to a parent, like this:
> pfm_kernel_kobj = kobject_create_and_add("perfmon", kernel_kobj);
>
> Does this increment the ref count on the parent?

Yes.

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-06-13 05:59    [W:0.063 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site