mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver Core patches for 2.6.9
Date: Tue, 19 Oct 2004 09:36:09 -0700	[thread overview]
Message-ID: <1098203769206@kroah.com> (raw)
In-Reply-To: <10982037663778@kroah.com>

ChangeSet 1.1832.55.9, 2004/09/08 21:25:19-07:00, greg@kroah.com

[PATCH] ksyms: don't implement /sys/kernel/hotplug_seqnum if CONFIG_HOTPLUG is not enabled.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 kernel/ksysfs.c |    8 ++++++--
 lib/kobject.c   |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)


diff -Nru a/kernel/ksysfs.c b/kernel/ksysfs.c
--- a/kernel/ksysfs.c	2004-10-19 09:23:10 -07:00
+++ b/kernel/ksysfs.c	2004-10-19 09:23:10 -07:00
@@ -22,17 +22,20 @@
 static struct subsys_attribute _name##_attr = \
 	__ATTR(_name, 0644, _name##_show, _name##_store)
 
+#ifdef CONFIG_HOTPLUG
 static ssize_t hotplug_seqnum_show(struct subsystem *subsys, char *page)
 {
 	return sprintf(page, "%llu\n", hotplug_seqnum);
 }
 KERNEL_ATTR_RO(hotplug_seqnum);
-
+#endif
 
 static decl_subsys(kernel, NULL, NULL);
 
 static struct attribute * kernel_attrs[] = {
+#ifdef CONFIG_HOTPLUG
 	&hotplug_seqnum_attr.attr,
+#endif
 	NULL
 };
 
@@ -44,7 +47,8 @@
 {
 	int error = subsystem_register(&kernel_subsys);
 	if (!error)
-		error = sysfs_create_group(&kernel_subsys.kset.kobj, &kernel_attr_group);
+		error = sysfs_create_group(&kernel_subsys.kset.kobj,
+					   &kernel_attr_group);
 
 	return error;
 }
diff -Nru a/lib/kobject.c b/lib/kobject.c
--- a/lib/kobject.c	2004-10-19 09:23:10 -07:00
+++ b/lib/kobject.c	2004-10-19 09:23:10 -07:00
@@ -118,9 +118,9 @@
 	return path;
 }
 
-u64 hotplug_seqnum;
 #ifdef CONFIG_HOTPLUG
 
+u64 hotplug_seqnum;
 #define BUFFER_SIZE	1024	/* should be enough memory for the env */
 #define NUM_ENVP	32	/* number of env pointers */
 static spinlock_t sequence_lock = SPIN_LOCK_UNLOCKED;


  reply	other threads:[~2004-10-19 16:47 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-19 16:34 [BK PATCH] " Greg KH
2004-10-19 16:35 ` [PATCH] " Greg KH
2004-10-19 16:35   ` Greg KH
2004-10-19 16:36     ` Greg KH
2004-10-19 16:36       ` Greg KH
2004-10-19 16:36         ` Greg KH
2004-10-19 16:36           ` Greg KH [this message]
2004-10-19 16:36             ` Greg KH
2004-10-19 16:36               ` Greg KH
2004-10-19 16:36                 ` Greg KH
2004-10-19 16:36                   ` Greg KH
2004-10-19 16:36                     ` Greg KH
2004-10-19 16:36                       ` Greg KH
2004-10-19 16:36                         ` Greg KH
2004-10-19 16:36                           ` Greg KH
2004-10-19 16:36                             ` Greg KH
2004-10-19 16:36                               ` Greg KH
2004-10-19 16:36                                 ` Greg KH
2004-10-19 16:36                                   ` Greg KH
2004-10-19 16:36                                     ` Greg KH
2004-10-19 16:36                                       ` Greg KH
2004-10-19 16:36                                         ` Greg KH
2004-10-19 16:36                                           ` Greg KH
2004-10-19 16:36                                             ` Greg KH
2004-10-19 16:36                                               ` Greg KH
2004-10-19 16:36                                                 ` Greg KH
2004-10-19 16:36                                                   ` Greg KH
2004-10-19 16:36                                                     ` Greg KH
2004-10-19 16:36                                                       ` Greg KH
2004-10-19 16:37                                                         ` Greg KH
2004-10-19 16:37                                                           ` Greg KH
2004-10-19 16:37                                                             ` Greg KH
2004-10-19 16:37                                                               ` Greg KH
2004-10-19 16:37                                                                 ` Greg KH
2004-10-19 16:37                                                                   ` Greg KH
2004-10-23 20:20                     ` Kronos
2004-10-23 20:34                       ` Greg KH
2004-10-23 21:46                         ` Kronos

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=1098203769206@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome