summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-06-27 16:28:05 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 18:03:06 -0700
commit3ee13937525f6044d769b1a84d5db5669ac1959e (patch)
tree5323526999e6c739ae453340492b1c95fdcccc7a /drivers/pcmcia
parent840c2ac5d3c1d50e8a181e3f661da814e89c8cf8 (diff)
downloadblackbird-op-linux-3ee13937525f6044d769b1a84d5db5669ac1959e.tar.gz
blackbird-op-linux-3ee13937525f6044d769b1a84d5db5669ac1959e.zip
[PATCH] pcmcia: hotplug event for PCMCIA socket devices
Generate hotplug event for PCMCIA sockets being registered. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 48e4f04530d8..fec9e0304738 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -1866,6 +1866,21 @@ int pcmcia_insert_card(struct pcmcia_socket *skt)
return ret;
} /* insert_card */
+static int pcmcia_socket_hotplug(struct class_device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size)
+{
+ struct pcmcia_socket *s = container_of(dev, struct pcmcia_socket, dev);
+ int i = 0, length = 0;
+
+ if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
+ &length, "SOCKET_NO=%u", s->sock))
+ return -ENOMEM;
+
+ envp[i] = NULL;
+
+ return 0;
+}
+
/*======================================================================
OS-specific module glue goes here
@@ -1895,6 +1910,7 @@ EXPORT_SYMBOL(pcmcia_parse_events);
struct class pcmcia_socket_class = {
.name = "pcmcia_socket",
+ .hotplug = pcmcia_socket_hotplug,
.release = pcmcia_release_socket,
};
EXPORT_SYMBOL(pcmcia_socket_class);
OpenPOWER on IntegriCloud