Lines Matching refs:class_dev
34 struct device *class_dev; member
87 static ssize_t show_name(struct device *class_dev, in show_name() argument
101 static ssize_t show_type(struct device *class_dev, in show_type() argument
123 static ssize_t show_min(struct device *class_dev, in show_min() argument
136 static ssize_t show_max(struct device *class_dev, in show_max() argument
149 static ssize_t show_def(struct device *class_dev, in show_def() argument
168 static ssize_t show_val_norm(struct device *class_dev, in show_val_norm() argument
187 static ssize_t show_val_custom(struct device *class_dev, in show_val_custom() argument
206 static ssize_t show_enum(struct device *class_dev, in show_enum() argument
230 static ssize_t show_bits(struct device *class_dev, in show_bits() argument
273 static ssize_t store_val_norm(struct device *class_dev, in store_val_norm() argument
287 static ssize_t store_val_custom(struct device *class_dev, in store_val_custom() argument
410 ret = sysfs_create_group(&sfp->class_dev->kobj,&cip->grp); in pvr2_sysfs_add_control()
445 ret = device_create_file(sfp->class_dev,&dip->attr_debugcmd); in pvr2_sysfs_add_debugifc()
453 ret = device_create_file(sfp->class_dev,&dip->attr_debuginfo); in pvr2_sysfs_add_debugifc()
468 device_remove_file(sfp->class_dev, in pvr2_sysfs_tear_down_debugifc()
472 device_remove_file(sfp->class_dev, in pvr2_sysfs_tear_down_debugifc()
497 sysfs_remove_group(&sfp->class_dev->kobj,&cip1->grp); in pvr2_sysfs_tear_down_controls()
514 static void pvr2_sysfs_release(struct device *class_dev) in pvr2_sysfs_release() argument
516 pvr2_sysfs_trace("Releasing class_dev id=%p",class_dev); in pvr2_sysfs_release()
517 kfree(class_dev); in pvr2_sysfs_release()
524 if (!sfp->class_dev) return; in class_dev_destroy()
530 device_remove_file(sfp->class_dev, in class_dev_destroy()
534 device_remove_file(sfp->class_dev, in class_dev_destroy()
538 device_remove_file(sfp->class_dev, in class_dev_destroy()
542 device_remove_file(sfp->class_dev, in class_dev_destroy()
546 device_remove_file(sfp->class_dev, in class_dev_destroy()
550 device_remove_file(sfp->class_dev, in class_dev_destroy()
553 pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); in class_dev_destroy()
554 dev_set_drvdata(sfp->class_dev, NULL); in class_dev_destroy()
555 dev = sfp->class_dev->parent; in class_dev_destroy()
556 sfp->class_dev->parent = NULL; in class_dev_destroy()
558 device_unregister(sfp->class_dev); in class_dev_destroy()
559 sfp->class_dev = NULL; in class_dev_destroy()
563 static ssize_t v4l_minor_number_show(struct device *class_dev, in v4l_minor_number_show() argument
567 sfp = dev_get_drvdata(class_dev); in v4l_minor_number_show()
575 static ssize_t bus_info_show(struct device *class_dev, in bus_info_show() argument
579 sfp = dev_get_drvdata(class_dev); in bus_info_show()
586 static ssize_t hdw_name_show(struct device *class_dev, in hdw_name_show() argument
590 sfp = dev_get_drvdata(class_dev); in hdw_name_show()
597 static ssize_t hdw_desc_show(struct device *class_dev, in hdw_desc_show() argument
601 sfp = dev_get_drvdata(class_dev); in hdw_desc_show()
608 static ssize_t v4l_radio_minor_number_show(struct device *class_dev, in v4l_radio_minor_number_show() argument
613 sfp = dev_get_drvdata(class_dev); in v4l_radio_minor_number_show()
621 static ssize_t unit_number_show(struct device *class_dev, in unit_number_show() argument
625 sfp = dev_get_drvdata(class_dev); in unit_number_show()
636 struct device *class_dev; in class_dev_create() local
641 class_dev = kzalloc(sizeof(*class_dev),GFP_KERNEL); in class_dev_create()
642 if (!class_dev) return; in class_dev_create()
644 pvr2_sysfs_trace("Creating class_dev id=%p",class_dev); in class_dev_create()
646 class_dev->class = &class_ptr->class; in class_dev_create()
648 dev_set_name(class_dev, "%s", in class_dev_create()
651 class_dev->parent = get_device(&usb_dev->dev); in class_dev_create()
653 sfp->class_dev = class_dev; in class_dev_create()
654 dev_set_drvdata(class_dev, sfp); in class_dev_create()
655 ret = device_register(class_dev); in class_dev_create()
659 put_device(class_dev); in class_dev_create()
668 ret = device_create_file(sfp->class_dev, in class_dev_create()
683 ret = device_create_file(sfp->class_dev, in class_dev_create()
698 ret = device_create_file(sfp->class_dev,&sfp->attr_unit_number); in class_dev_create()
712 ret = device_create_file(sfp->class_dev, in class_dev_create()
727 ret = device_create_file(sfp->class_dev, in class_dev_create()
742 ret = device_create_file(sfp->class_dev, in class_dev_create()
815 static ssize_t debuginfo_show(struct device *class_dev, in debuginfo_show() argument
819 sfp = dev_get_drvdata(class_dev); in debuginfo_show()
826 static ssize_t debugcmd_show(struct device *class_dev, in debugcmd_show() argument
830 sfp = dev_get_drvdata(class_dev); in debugcmd_show()
836 static ssize_t debugcmd_store(struct device *class_dev, in debugcmd_store() argument
843 sfp = dev_get_drvdata(class_dev); in debugcmd_store()