From: Greg KH <greg@kroah.com>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.6.10-rc2-mm4] perfctr sysfs update 1/4: core
Date: Thu, 2 Dec 2004 10:59:18 -0800 [thread overview]
Message-ID: <20041202185918.GA8264@kroah.com> (raw)
In-Reply-To: <200412021010.iB2AAORk004531@alkaid.it.uu.se>
On Thu, Dec 02, 2004 at 11:10:24AM +0100, Mikael Pettersson wrote:
> +static int __init perfctr_class_init(void)
> +{
> + int ret;
> +
> + ret = class_register(&perfctr_class);
> + if (ret)
> + return ret;
> + ret |= class_create_file(&perfctr_class, &class_attr_driver_version);
> + ret |= class_create_file(&perfctr_class, &class_attr_cpu_type);
> + ret |= class_create_file(&perfctr_class, &class_attr_cpu_features);
> + ret |= class_create_file(&perfctr_class, &class_attr_cpu_khz);
> + ret |= class_create_file(&perfctr_class, &class_attr_tsc_to_cpu_mult);
> + ret |= class_create_file(&perfctr_class, &class_attr_cpus_online);
> + ret |= class_create_file(&perfctr_class, &class_attr_cpus_forbidden);
> + if (ret)
> + class_unregister(&perfctr_class);
> + return ret;
It's easier to use sysfs_create_group() instead of registering all of
the individual files.
thanks,
greg k-h
next prev parent reply other threads:[~2004-12-02 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 10:10 [PATCH][2.6.10-rc2-mm4] perfctr sysfs update 1/4: core Mikael Pettersson
2004-12-02 18:59 ` Greg KH [this message]
2004-12-03 9:52 ` Mikael Pettersson
2004-12-03 17:03 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041202185918.GA8264@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox