diff options
Diffstat (limited to 'drivers/firmware/dmi_scan.c')
-rw-r--r-- | drivers/firmware/dmi_scan.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index d46467271349..b3d22d659990 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c | |||
@@ -277,6 +277,29 @@ static void __init dmi_save_ipmi_device(const struct dmi_header *dm) | |||
277 | list_add_tail(&dev->list, &dmi_devices); | 277 | list_add_tail(&dev->list, &dmi_devices); |
278 | } | 278 | } |
279 | 279 | ||
280 | static void __init dmi_save_dev_onboard(int instance, int segment, int bus, | ||
281 | int devfn, const char *name) | ||
282 | { | ||
283 | struct dmi_dev_onboard *onboard_dev; | ||
284 | |||
285 | onboard_dev = dmi_alloc(sizeof(*onboard_dev) + strlen(name) + 1); | ||
286 | if (!onboard_dev) { | ||
287 | printk(KERN_ERR "dmi_save_dev_onboard: out of memory.\n"); | ||
288 | return; | ||
289 | } | ||
290 | onboard_dev->instance = instance; | ||
291 | onboard_dev->segment = segment; | ||
292 | onboard_dev->bus = bus; | ||
293 | onboard_dev->devfn = devfn; | ||
294 | |||
295 | strcpy((char *)&onboard_dev[1], name); | ||
296 | onboard_dev->dev.type = DMI_DEV_TYPE_DEV_ONBOARD; | ||
297 | onboard_dev->dev.name = (char *)&onboard_dev[1]; | ||
298 | onboard_dev->dev.device_data = onboard_dev; | ||
299 | |||
300 | list_add(&onboard_dev->dev.list, &dmi_devices); | ||
301 | } | ||
302 | |||
280 | static void __init dmi_save_extended_devices(const struct dmi_header *dm) | 303 | static void __init dmi_save_extended_devices(const struct dmi_header *dm) |
281 | { | 304 | { |
282 | const u8 *d = (u8*) dm + 5; | 305 | const u8 *d = (u8*) dm + 5; |
@@ -285,6 +308,8 @@ static void __init dmi_save_extended_devices(const struct dmi_header *dm) | |||
285 | if ((*d & 0x80) == 0) | 308 | if ((*d & 0x80) == 0) |
286 | return; | 309 | return; |
287 | 310 | ||
311 | dmi_save_dev_onboard(*(d+1), *(u16 *)(d+2), *(d+4), *(d+5), | ||
312 | dmi_string_nosave(dm, *(d-1))); | ||
288 | dmi_save_one_device(*d & 0x7f, dmi_string_nosave(dm, *(d - 1))); | 313 | dmi_save_one_device(*d & 0x7f, dmi_string_nosave(dm, *(d - 1))); |
289 | } | 314 | } |
290 | 315 | ||