Commit 82e6fc3e authored by Federico Vaga's avatar Federico Vaga

kernel: when a name is not assigned, use the device name

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent af1c35a5
......@@ -643,8 +643,10 @@ static void zobj_create_link(struct zio_obj_head *head)
int err;
/* Create the symlink with custom channel name */
if (strlen(head->name) == 0)
if (strlen(head->name) == 0) {
strncpy(head->name, dev_name(&head->dev), ZIO_OBJ_NAME_LEN);
return;
}
err = sysfs_create_link(&head->dev.parent->kobj, &head->dev.kobj,
head->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment