/* By default we select char/ for new entries. Setting class->dev_obj to NULL prevents an entry from being created. class->dev_kobj must be set (or cleared) before any devices are registered to the class otherwise device_create_sys_dev_entry() and device_remove_sys_dev_entry() will disagree about the the presence of the link.  */
static struct kobject* device_to_dev_kobj(struct device *dev)
/* By default we select char/ for new entries. Setting class->dev_obj to NULL prevents an entry from being created. class->dev_kobj must be set (or cleared) before any devices are registered to the class otherwise device_create_sys_dev_entry() and device_remove_sys_dev_entry() will disagree about the the presence of the link.  */
static struct kobject* device_to_dev_kobj(struct device *dev)
{
	struct kobject *kobj;
	if (dev->class)
		kobj = dev->class->dev_kobj;
	else
		kobj = sysfs_dev_char_kobj;
	return kobj;
}