public inbox for linux-kernel@vger.kernel.org
 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.6
Date: Fri, 14 May 2004 16:07:23 -0700	[thread overview]
Message-ID: <10845760432011@kroah.com> (raw)
In-Reply-To: <10845760421519@kroah.com>

ChangeSet 1.1587.5.23, 2004/05/11 13:32:24-07:00, greg@kroah.com

Module attributes: fix build error if CONFIG_MODULE_UNLOAD=n

Thanks to Andrew Morton for pointing this out to me.


 kernel/module.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)


diff -Nru a/kernel/module.c b/kernel/module.c
--- a/kernel/module.c	Fri May 14 15:57:16 2004
+++ b/kernel/module.c	Fri May 14 15:57:16 2004
@@ -379,6 +379,22 @@
 }
 #endif /* CONFIG_SMP */
 
+static int add_attribute(struct module *mod, struct kernel_param *kp)
+{
+	struct module_attribute *a;
+	int retval;
+
+	a = &mod->mkobj->attr[mod->mkobj->num_attributes];
+	a->attr.name = (char *)kp->name;
+	a->attr.owner = mod;
+	a->attr.mode = kp->perm;
+	a->param = kp;
+	retval = sysfs_create_file(&mod->mkobj->kobj, &a->attr);
+	if (!retval)
+		mod->mkobj->num_attributes++;
+	return retval;
+}
+
 #ifdef CONFIG_MODULE_UNLOAD
 /* Init the unload section of the module. */
 static void module_unload_init(struct module *mod)
@@ -502,22 +518,6 @@
 	struct stopref sref = { mod, flags, forced };
 
 	return stop_machine_run(__try_stop_module, &sref, NR_CPUS);
-}
-
-static int add_attribute(struct module *mod, struct kernel_param *kp)
-{
-	struct module_attribute *a;
-	int retval;
-
-	a = &mod->mkobj->attr[mod->mkobj->num_attributes];
-	a->attr.name = (char *)kp->name;
-	a->attr.owner = mod;
-	a->attr.mode = kp->perm;
-	a->param = kp;
-	retval = sysfs_create_file(&mod->mkobj->kobj, &a->attr);
-	if (!retval)
-		mod->mkobj->num_attributes++;
-	return retval;
 }
 
 unsigned int module_refcount(struct module *mod)


  reply	other threads:[~2004-05-14 23:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14 23:06 [BK PATCH] Driver Core patches for 2.6.6 Greg KH
2004-05-14 23:07 ` [PATCH] " Greg KH
2004-05-14 23:07   ` Greg KH
2004-05-14 23:07     ` Greg KH
2004-05-14 23:07       ` Greg KH
2004-05-14 23:07         ` Greg KH
2004-05-14 23:07           ` Greg KH
2004-05-14 23:07             ` Greg KH
2004-05-14 23:07               ` Greg KH
2004-05-14 23:07                 ` Greg KH
2004-05-14 23:07                   ` Greg KH
2004-05-14 23:07                     ` Greg KH
2004-05-14 23:07                       ` Greg KH
2004-05-14 23:07                         ` Greg KH [this message]
2004-05-14 23:07                           ` Greg KH
2004-05-14 23:07                             ` Greg KH
2004-05-14 23:07                               ` Greg KH
2004-05-14 23:07                                 ` Greg KH
2004-05-14 23:07                                   ` Greg KH
2004-05-14 23:07                                     ` Greg KH
2004-05-14 23:24                                   ` zombies with AMD64 and 32 bit userspace with 2.6 David Lang

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=10845760432011@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