diff options
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r-- | drivers/pcmcia/cs.c | 16 |
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) | |||
1866 | return ret; | 1866 | return ret; |
1867 | } /* insert_card */ | 1867 | } /* insert_card */ |
1868 | 1868 | ||
1869 | static int pcmcia_socket_hotplug(struct class_device *dev, char **envp, | ||
1870 | int num_envp, char *buffer, int buffer_size) | ||
1871 | { | ||
1872 | struct pcmcia_socket *s = container_of(dev, struct pcmcia_socket, dev); | ||
1873 | int i = 0, length = 0; | ||
1874 | |||
1875 | if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, | ||
1876 | &length, "SOCKET_NO=%u", s->sock)) | ||
1877 | return -ENOMEM; | ||
1878 | |||
1879 | envp[i] = NULL; | ||
1880 | |||
1881 | return 0; | ||
1882 | } | ||
1883 | |||
1869 | /*====================================================================== | 1884 | /*====================================================================== |
1870 | 1885 | ||
1871 | OS-specific module glue goes here | 1886 | OS-specific module glue goes here |
@@ -1895,6 +1910,7 @@ EXPORT_SYMBOL(pcmcia_parse_events); | |||
1895 | 1910 | ||
1896 | struct class pcmcia_socket_class = { | 1911 | struct class pcmcia_socket_class = { |
1897 | .name = "pcmcia_socket", | 1912 | .name = "pcmcia_socket", |
1913 | .hotplug = pcmcia_socket_hotplug, | ||
1898 | .release = pcmcia_release_socket, | 1914 | .release = pcmcia_release_socket, |
1899 | }; | 1915 | }; |
1900 | EXPORT_SYMBOL(pcmcia_socket_class); | 1916 | EXPORT_SYMBOL(pcmcia_socket_class); |