From: Johannes Berg <johannes@sipsolutions.net>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.de>
Subject: [PATCH -next 07/11] remove CONFIG_KMOD from sound
Date: Wed, 09 Jul 2008 10:28:41 +0200 [thread overview]
Message-ID: <20080709082903.748848000@sipsolutions.net> (raw)
In-Reply-To: 20080709082834.942992000@sipsolutions.net
[-- Attachment #1: 009-config-kmod-remove-sound.patch --]
[-- Type: text/plain, Size: 5161 bytes --]
A bunch of things in alsa depend on CONFIG_KMOD,
use CONFIG_MODULES instead where the dependency
is needed at all.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Takashi Iwai <tiwai@suse.de>
---
v2: remove #ifdef around EXPORT_SYMBOL pointed out by
Adrian Bunk
include/sound/seq_kernel.h | 2 +-
sound/core/seq/seq_clientmgr.c | 2 +-
sound/core/seq/seq_device.c | 6 ++----
sound/core/sound.c | 8 ++++----
sound/core/timer.c | 6 +++---
sound/ppc/daca.c | 2 --
sound/ppc/tumbler.c | 2 --
7 files changed, 11 insertions(+), 17 deletions(-)
--- linux-next.orig/include/sound/seq_kernel.h 2008-07-08 23:47:40.000000000 +0200
+++ linux-next/include/sound/seq_kernel.h 2008-07-08 23:55:27.000000000 +0200
@@ -105,7 +105,7 @@ int snd_seq_event_port_attach(int client
int cap, int type, int midi_channels, int midi_voices, char *portname);
int snd_seq_event_port_detach(int client, int port);
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
void snd_seq_autoload_lock(void);
void snd_seq_autoload_unlock(void);
#else
--- linux-next.orig/sound/core/seq/seq_clientmgr.c 2008-07-08 23:47:42.000000000 +0200
+++ linux-next/sound/core/seq/seq_clientmgr.c 2008-07-08 23:55:27.000000000 +0200
@@ -148,7 +148,7 @@ struct snd_seq_client *snd_seq_client_us
return NULL;
}
spin_unlock_irqrestore(&clients_lock, flags);
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
if (!in_interrupt()) {
static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS];
static char card_requested[SNDRV_CARDS];
--- linux-next.orig/sound/core/seq/seq_device.c 2008-07-08 23:47:42.000000000 +0200
+++ linux-next/sound/core/seq/seq_device.c 2008-07-08 23:55:27.000000000 +0200
@@ -124,7 +124,7 @@ static void snd_seq_device_info(struct s
* load all registered drivers (called from seq_clientmgr.c)
*/
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
/* avoid auto-loading during module_init() */
static int snd_seq_in_init;
void snd_seq_autoload_lock(void)
@@ -140,7 +140,7 @@ void snd_seq_autoload_unlock(void)
void snd_seq_device_load_drivers(void)
{
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
struct ops_list *ops;
/* Calling request_module during module_init()
@@ -566,7 +566,5 @@ EXPORT_SYMBOL(snd_seq_device_load_driver
EXPORT_SYMBOL(snd_seq_device_new);
EXPORT_SYMBOL(snd_seq_device_register_driver);
EXPORT_SYMBOL(snd_seq_device_unregister_driver);
-#ifdef CONFIG_KMOD
EXPORT_SYMBOL(snd_seq_autoload_lock);
EXPORT_SYMBOL(snd_seq_autoload_unlock);
-#endif
--- linux-next.orig/sound/core/sound.c 2008-07-08 23:47:42.000000000 +0200
+++ linux-next/sound/core/sound.c 2008-07-08 23:55:27.000000000 +0200
@@ -61,14 +61,14 @@ EXPORT_SYMBOL(snd_ecards_limit);
static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
static DEFINE_MUTEX(sound_mutex);
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
/**
* snd_request_card - try to load the card module
* @card: the card number
*
* Tries to load the module "snd-card-X" for the given card number
- * via KMOD. Returns immediately if already loaded.
+ * via request_module. Returns immediately if already loaded.
*/
void snd_request_card(int card)
{
@@ -93,7 +93,7 @@ static void snd_request_other(int minor)
request_module(str);
}
-#endif /* request_module support */
+#endif /* modular kernel */
/**
* snd_lookup_minor_data - get user data of a registered device
@@ -133,7 +133,7 @@ static int __snd_open(struct inode *inod
return -ENODEV;
mptr = snd_minors[minor];
if (mptr == NULL) {
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
int dev = SNDRV_MINOR_DEVICE(minor);
if (dev == SNDRV_MINOR_CONTROL) {
/* /dev/aloadC? */
--- linux-next.orig/sound/core/timer.c 2008-07-08 23:47:42.000000000 +0200
+++ linux-next/sound/core/timer.c 2008-07-08 23:55:27.000000000 +0200
@@ -146,7 +146,7 @@ static struct snd_timer *snd_timer_find(
return NULL;
}
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
static void snd_timer_request(struct snd_timer_id *tid)
{
@@ -259,8 +259,8 @@ int snd_timer_open(struct snd_timer_inst
/* open a master instance */
mutex_lock(®ister_mutex);
timer = snd_timer_find(tid);
-#ifdef CONFIG_KMOD
- if (timer == NULL) {
+#ifdef CONFIG_MODULES
+ if (!timer) {
mutex_unlock(®ister_mutex);
snd_timer_request(tid);
mutex_lock(®ister_mutex);
--- linux-next.orig/sound/ppc/daca.c 2008-07-08 23:47:43.000000000 +0200
+++ linux-next/sound/ppc/daca.c 2008-07-08 23:55:27.000000000 +0200
@@ -249,9 +249,7 @@ int __init snd_pmac_daca_init(struct snd
int i, err;
struct pmac_daca *mix;
-#ifdef CONFIG_KMOD
request_module("i2c-powermac");
-#endif /* CONFIG_KMOD */
mix = kzalloc(sizeof(*mix), GFP_KERNEL);
if (! mix)
--- linux-next.orig/sound/ppc/tumbler.c 2008-07-08 23:47:43.000000000 +0200
+++ linux-next/sound/ppc/tumbler.c 2008-07-08 23:55:27.000000000 +0200
@@ -1350,9 +1350,7 @@ int __init snd_pmac_tumbler_init(struct
struct device_node *tas_node, *np;
char *chipname;
-#ifdef CONFIG_KMOD
request_module("i2c-powermac");
-#endif /* CONFIG_KMOD */
mix = kzalloc(sizeof(*mix), GFP_KERNEL);
if (! mix)
--
next prev parent reply other threads:[~2008-07-09 12:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 8:28 [PATCH -next 00/11] remove CONFIG_KMOD Johannes Berg
2008-07-09 8:28 ` [PATCH -next 01/11] make CONFIG_KMOD invisible Johannes Berg
2008-07-09 8:28 ` [PATCH -next 02/11] remove CONFIG_KMOD from core kernel code Johannes Berg
2008-07-09 8:28 ` [PATCH -next 03/11] rework try_then_request_module to do less in non-modular kernels Johannes Berg
2008-07-09 8:28 ` [PATCH -next 04/11] remove CONFIG_KMOD from drivers Johannes Berg
2008-07-09 8:28 ` Johannes Berg
2008-07-09 8:28 ` [PATCH -next 05/11] remove CONFIG_KMOD from sparc64 Johannes Berg
2008-07-09 8:28 ` [PATCH -next 06/11] remove CONFIG_KMOD from fs Johannes Berg
2008-07-09 8:28 ` Johannes Berg [this message]
2008-07-09 17:33 ` [PATCH -next 07/11] remove CONFIG_KMOD from sound Takashi Iwai
2008-07-09 8:28 ` [PATCH -next 08/11] remove CONFIG_KMOD from net Johannes Berg
2008-07-09 8:28 ` [PATCH -next 09/11] remove CONFIG_KMOD from lib Johannes Berg
2008-07-09 8:28 ` [PATCH -next 10/11] remove mention of CONFIG_KMOD from documentation Johannes Berg
2008-07-09 8:28 ` [PATCH -next 11/11] remove CONFIG_KMOD Johannes Berg
2008-07-13 15:03 ` [PATCH -next 00/11] " Andi Kleen
2008-07-14 0:38 ` Rusty Russell
2008-07-14 7:52 ` Johannes Berg
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=20080709082903.748848000@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.