From: Rusty Russell <rusty@rustcorp.com.au>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org, "Adam J. Richter" <adam@yggdrasil.com>
Subject: [PATCH] module device table restoration
Date: Wed, 20 Nov 2002 18:00:19 +1100 [thread overview]
Message-ID: <20021120072654.322C02C087@lists.samba.org> (raw)
Patch from Adam Richter. I have a nicer solution based on aliases,
but it requires coordination with USB, PCI and PCMCIA maintainers,
which is taking time.
This restores the old code in the meantime: one week without this is
too long or people who need it. 8(
Please apply unless Adam has objections,
Rusty.
--- linux-2.5.48/include/linux/module.h 2002-11-17 20:29:52.000000000 -0800
+++ linux/include/linux/module.h 2002-11-18 08:05:19.000000000 -0800
@@ -26,8 +26,6 @@
#define MODULE_AUTHOR(name)
#define MODULE_DESCRIPTION(desc)
#define MODULE_SUPPORTED_DEVICE(name)
-#define MODULE_GENERIC_TABLE(gtype,name)
-#define MODULE_DEVICE_TABLE(type,name)
#define MODULE_PARM_DESC(var,desc)
#define print_symbol(format, addr)
#define print_modules()
@@ -40,14 +38,28 @@
};
#ifdef MODULE
+
+#define MODULE_GENERIC_TABLE(gtype,name) \
+static const unsigned long __module_##gtype##_size \
+ __attribute__ ((unused)) = sizeof(struct gtype##_id); \
+static const struct gtype##_id * __module_##gtype##_table \
+ __attribute__ ((unused)) = name
+
/* This is magically filled in by the linker, but THIS_MODULE must be
a constant so it works in initializers. */
extern struct module __this_module;
#define THIS_MODULE (&__this_module)
-#else
+
+#else /* !MODULE */
+
+#define MODULE_GENERIC_TABLE(gtype,name)
#define THIS_MODULE ((struct module *)0)
+
#endif
+#define MODULE_DEVICE_TABLE(type,name) \
+ MODULE_GENERIC_TABLE(type##_device,name)
+
#ifdef CONFIG_MODULES
/* Get/put a kernel symbol (calls must be symmetric) */
void *__symbol_get(const char *symbol);
next reply other threads:[~2002-11-20 7:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-20 7:00 Rusty Russell [this message]
2002-11-20 8:09 ` Greg KH
2002-11-20 11:32 Adam J. Richter
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=20021120072654.322C02C087@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=adam@yggdrasil.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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