Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75306
b: refs/heads/master
c: ce8c628
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Linus Torvalds committed Jan 9, 2008
1 parent 3f36ae8 commit 53e911d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83a08e7c6ed533a47631794e7f618a98094b4129
refs/heads/master: ce8c628abadaf16a44953301c68b9f54cf6898cc
19 changes: 14 additions & 5 deletions trunk/drivers/firmware/dmi-id.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,11 @@ static struct device *dmi_dev;

extern int dmi_available;

static int __init dmi_id_init(void)
/* In a separate function to keep gcc 3.2 happy - do NOT merge this in
dmi_id_init! */
static void __init dmi_id_init_attr_table(void)
{
int ret, i;

if (!dmi_available)
return -ENODEV;
int i;

/* Not necessarily all DMI fields are available on all
* systems, hence let's built an attribute table of just
Expand All @@ -205,6 +204,16 @@ static int __init dmi_id_init(void)
ADD_DMI_ATTR(chassis_serial, DMI_CHASSIS_SERIAL);
ADD_DMI_ATTR(chassis_asset_tag, DMI_CHASSIS_ASSET_TAG);
sys_dmi_attributes[i++] = &sys_dmi_modalias_attr.attr;
}

static int __init dmi_id_init(void)
{
int ret;

if (!dmi_available)
return -ENODEV;

dmi_id_init_attr_table();

ret = class_register(&dmi_class);
if (ret)
Expand Down

0 comments on commit 53e911d

Please sign in to comment.