[PATCH] pcmcia: cs.c : load "pcmcia" module automatically.

Dominik Brodowski linux at dominikbrodowski.net
Sat Nov 7 07:17:05 EST 2009


Hey,

On Tue, Nov 03, 2009 at 08:22:48AM +0900, Komuro wrote:
> >> This patch integrates some of the pcmciautils feature into the kernel.
> >
> >yes, but why? Also, wouldn't request_module_nowait() suffice?
> >
> 
> (1)
> Because the "pcmcia" is kernel module, so I think it should be
> loaded by kernel, if kernel can do it.
> 
> (2)
> Even if distribution developer forgets to install the pcmciautils,
> the "pcmcia" is loaded with this patch.
> (especially embedded systems)
> 
> (3)
> I think request_module_nowait is better.

What about this?

Best,
	Dominik


[PATCH] pcmcia: autoload module pcmcia

Attempt to load the "pcmcia" module for 16-bit PCMCIA cards, so that
PCMCIA support becomes available without pcmciautils/udev userspace
interaction. Based on a suggestion and a patch
	Signed-off-by: Komuro <komurojun-mbn at nifty.com>
but converted it to request_module_nowait() and move it to a later
stage.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>

diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index b229f6d..f56e88c 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -243,6 +243,13 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
 
 	pcmcia_parse_events(socket, SS_DETECT);
 
+	/*
+	 * Let's try to get the PCMCIA module for 16-bit PCMCIA support.
+	 * If it fails, it doesn't matter -- we still havae 32-bit CardBus
+	 * support to offer, so this is not a failure mode.
+	 */
+	request_module_nowait("pcmcia");
+
 	return 0;
 
  err:



More information about the linux-pcmcia mailing list