aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/eisa
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/eisa')
-rw-r--r--drivers/eisa/eisa-bus.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c
index 6078e2f58817..3a365e159d89 100644
--- a/drivers/eisa/eisa-bus.c
+++ b/drivers/eisa/eisa-bus.c
@@ -128,9 +128,23 @@ static int eisa_bus_match (struct device *dev, struct device_driver *drv)
128 return 0; 128 return 0;
129} 129}
130 130
131static int eisa_bus_uevent(struct device *dev, char **envp, int num_envp,
132 char *buffer, int buffer_size)
133{
134 struct eisa_device *edev = to_eisa_device(dev);
135 int i = 0;
136 int length = 0;
137
138 add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
139 "MODALIAS=" EISA_DEVICE_MODALIAS_FMT, edev->id.sig);
140 envp[i] = NULL;
141 return 0;
142}
143
131struct bus_type eisa_bus_type = { 144struct bus_type eisa_bus_type = {
132 .name = "eisa", 145 .name = "eisa",
133 .match = eisa_bus_match, 146 .match = eisa_bus_match,
147 .uevent = eisa_bus_uevent,
134}; 148};
135 149
136int eisa_driver_register (struct eisa_driver *edrv) 150int eisa_driver_register (struct eisa_driver *edrv)
@@ -160,6 +174,14 @@ static ssize_t eisa_show_state (struct device *dev, struct device_attribute *att
160 174
161static DEVICE_ATTR(enabled, S_IRUGO, eisa_show_state, NULL); 175static DEVICE_ATTR(enabled, S_IRUGO, eisa_show_state, NULL);
162 176
177static ssize_t eisa_show_modalias (struct device *dev, struct device_attribute *attr, char *buf)
178{
179 struct eisa_device *edev = to_eisa_device (dev);
180 return sprintf (buf, EISA_DEVICE_MODALIAS_FMT "\n", edev->id.sig);
181}
182
183static DEVICE_ATTR(modalias, S_IRUGO, eisa_show_modalias, NULL);
184
163static int __init eisa_init_device (struct eisa_root_device *root, 185static int __init eisa_init_device (struct eisa_root_device *root,
164 struct eisa_device *edev, 186 struct eisa_device *edev,
165 int slot) 187 int slot)
@@ -209,6 +231,7 @@ static int __init eisa_register_device (struct eisa_device *edev)
209 231
210 device_create_file (&edev->dev, &dev_attr_signature); 232 device_create_file (&edev->dev, &dev_attr_signature);
211 device_create_file (&edev->dev, &dev_attr_enabled); 233 device_create_file (&edev->dev, &dev_attr_enabled);
234 device_create_file (&edev->dev, &dev_attr_modalias);
212 235
213 return 0; 236 return 0;
214} 237}