Commit d8af9dc3 authored by Patrick Mochel's avatar Patrick Mochel

[driver model] Make sure type is set correctly for system devices.

parent d588262f
......@@ -173,6 +173,9 @@ int sys_device_register(struct sys_device * sysdev)
/* Make sure the kset is set */
sysdev->kobj.kset = &cls->kset;
/* But make sure we point to the right type for sysfs translation */
sysdev->kobj.ktype = &ktype_sysdev;
/* set the kobject name */
snprintf(sysdev->kobj.name,KOBJ_NAME_LEN,"%s%d",
cls->kset.kobj.name,sysdev->id);
......
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