Lines Matching refs:class_dev

20 	struct device *class_dev;  member
69 static ssize_t show_name(struct device *class_dev, in show_name() argument
83 static ssize_t show_type(struct device *class_dev, in show_type() argument
104 static ssize_t show_min(struct device *class_dev, in show_min() argument
117 static ssize_t show_max(struct device *class_dev, in show_max() argument
130 static ssize_t show_def(struct device *class_dev, in show_def() argument
149 static ssize_t show_val_norm(struct device *class_dev, in show_val_norm() argument
168 static ssize_t show_val_custom(struct device *class_dev, in show_val_custom() argument
187 static ssize_t show_enum(struct device *class_dev, in show_enum() argument
211 static ssize_t show_bits(struct device *class_dev, in show_bits() argument
254 static ssize_t store_val_norm(struct device *class_dev, in store_val_norm() argument
268 static ssize_t store_val_custom(struct device *class_dev, in store_val_custom() argument
391 ret = sysfs_create_group(&sfp->class_dev->kobj,&cip->grp); in pvr2_sysfs_add_control()
426 ret = device_create_file(sfp->class_dev,&dip->attr_debugcmd); in pvr2_sysfs_add_debugifc()
434 ret = device_create_file(sfp->class_dev,&dip->attr_debuginfo); in pvr2_sysfs_add_debugifc()
449 device_remove_file(sfp->class_dev, in pvr2_sysfs_tear_down_debugifc()
453 device_remove_file(sfp->class_dev, in pvr2_sysfs_tear_down_debugifc()
478 sysfs_remove_group(&sfp->class_dev->kobj,&cip1->grp); in pvr2_sysfs_tear_down_controls()
486 static void pvr2_sysfs_release(struct device *class_dev) in pvr2_sysfs_release() argument
488 pvr2_sysfs_trace("Releasing class_dev id=%p",class_dev); in pvr2_sysfs_release()
489 kfree(class_dev); in pvr2_sysfs_release()
502 if (!sfp->class_dev) return; in class_dev_destroy()
508 device_remove_file(sfp->class_dev, in class_dev_destroy()
512 device_remove_file(sfp->class_dev, in class_dev_destroy()
516 device_remove_file(sfp->class_dev, in class_dev_destroy()
520 device_remove_file(sfp->class_dev, in class_dev_destroy()
524 device_remove_file(sfp->class_dev, in class_dev_destroy()
528 device_remove_file(sfp->class_dev, in class_dev_destroy()
531 pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); in class_dev_destroy()
532 dev_set_drvdata(sfp->class_dev, NULL); in class_dev_destroy()
533 dev = sfp->class_dev->parent; in class_dev_destroy()
534 sfp->class_dev->parent = NULL; in class_dev_destroy()
536 device_unregister(sfp->class_dev); in class_dev_destroy()
537 sfp->class_dev = NULL; in class_dev_destroy()
541 static ssize_t v4l_minor_number_show(struct device *class_dev, in v4l_minor_number_show() argument
545 sfp = dev_get_drvdata(class_dev); in v4l_minor_number_show()
553 static ssize_t bus_info_show(struct device *class_dev, in bus_info_show() argument
557 sfp = dev_get_drvdata(class_dev); in bus_info_show()
564 static ssize_t hdw_name_show(struct device *class_dev, in hdw_name_show() argument
568 sfp = dev_get_drvdata(class_dev); in hdw_name_show()
575 static ssize_t hdw_desc_show(struct device *class_dev, in hdw_desc_show() argument
579 sfp = dev_get_drvdata(class_dev); in hdw_desc_show()
586 static ssize_t v4l_radio_minor_number_show(struct device *class_dev, in v4l_radio_minor_number_show() argument
591 sfp = dev_get_drvdata(class_dev); in v4l_radio_minor_number_show()
599 static ssize_t unit_number_show(struct device *class_dev, in unit_number_show() argument
603 sfp = dev_get_drvdata(class_dev); in unit_number_show()
613 struct device *class_dev; in class_dev_create() local
618 class_dev = kzalloc(sizeof(*class_dev),GFP_KERNEL); in class_dev_create()
619 if (!class_dev) return; in class_dev_create()
621 pvr2_sysfs_trace("Creating class_dev id=%p",class_dev); in class_dev_create()
623 class_dev->class = &pvr2_class; in class_dev_create()
625 dev_set_name(class_dev, "%s", in class_dev_create()
628 class_dev->parent = get_device(&usb_dev->dev); in class_dev_create()
630 sfp->class_dev = class_dev; in class_dev_create()
631 dev_set_drvdata(class_dev, sfp); in class_dev_create()
632 ret = device_register(class_dev); in class_dev_create()
636 put_device(class_dev); in class_dev_create()
645 ret = device_create_file(sfp->class_dev, in class_dev_create()
660 ret = device_create_file(sfp->class_dev, in class_dev_create()
675 ret = device_create_file(sfp->class_dev,&sfp->attr_unit_number); in class_dev_create()
689 ret = device_create_file(sfp->class_dev, in class_dev_create()
704 ret = device_create_file(sfp->class_dev, in class_dev_create()
719 ret = device_create_file(sfp->class_dev, in class_dev_create()
776 static ssize_t debuginfo_show(struct device *class_dev, in debuginfo_show() argument
780 sfp = dev_get_drvdata(class_dev); in debuginfo_show()
787 static ssize_t debugcmd_show(struct device *class_dev, in debugcmd_show() argument
791 sfp = dev_get_drvdata(class_dev); in debugcmd_show()
797 static ssize_t debugcmd_store(struct device *class_dev, in debugcmd_store() argument
804 sfp = dev_get_drvdata(class_dev); in debugcmd_store()