aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/dmi-id.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/dmi-id.c')
-rw-r--r--drivers/firmware/dmi-id.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index 59c3b5aa89f4..2678098d4504 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -134,14 +134,17 @@ static struct attribute_group* sys_dmi_attribute_groups[] = {
134 NULL 134 NULL
135}; 135};
136 136
137static int dmi_dev_uevent(struct device *dev, char **envp, 137static int dmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
138 int num_envp, char *buffer, int buffer_size)
139{ 138{
140 strcpy(buffer, "MODALIAS="); 139 ssize_t len;
141 get_modalias(buffer+9, buffer_size-9); 140
142 envp[0] = buffer; 141 if (add_uevent_var(env, "MODALIAS="))
143 envp[1] = NULL; 142 return -ENOMEM;
144 143 len = get_modalias(&env->buf[env->buflen - 1],
144 sizeof(env->buf) - env->buflen);
145 if (len >= (sizeof(env->buf) - env->buflen))
146 return -ENOMEM;
147 env->buflen += len;
145 return 0; 148 return 0;
146} 149}
147 150