Lines Matching refs:class_dev

20 	struct device *class_dev;  member
73 static ssize_t show_name(struct device *class_dev, in show_name() argument
87 static ssize_t show_type(struct device *class_dev, in show_type() argument
108 static ssize_t show_min(struct device *class_dev, in show_min() argument
121 static ssize_t show_max(struct device *class_dev, in show_max() argument
134 static ssize_t show_def(struct device *class_dev, in show_def() argument
153 static ssize_t show_val_norm(struct device *class_dev, in show_val_norm() argument
172 static ssize_t show_val_custom(struct device *class_dev, in show_val_custom() argument
191 static ssize_t show_enum(struct device *class_dev, in show_enum() argument
215 static ssize_t show_bits(struct device *class_dev, in show_bits() argument
258 static ssize_t store_val_norm(struct device *class_dev, in store_val_norm() argument
272 static ssize_t store_val_custom(struct device *class_dev, in store_val_custom() argument
395 ret = sysfs_create_group(&sfp->class_dev->kobj,&cip->grp); in pvr2_sysfs_add_control()
430 ret = device_create_file(sfp->class_dev,&dip->attr_debugcmd); in pvr2_sysfs_add_debugifc()
438 ret = device_create_file(sfp->class_dev,&dip->attr_debuginfo); in pvr2_sysfs_add_debugifc()
453 device_remove_file(sfp->class_dev, in pvr2_sysfs_tear_down_debugifc()
457 device_remove_file(sfp->class_dev, in pvr2_sysfs_tear_down_debugifc()
482 sysfs_remove_group(&sfp->class_dev->kobj,&cip1->grp); in pvr2_sysfs_tear_down_controls()
499 static void pvr2_sysfs_release(struct device *class_dev) in pvr2_sysfs_release() argument
501 pvr2_sysfs_trace("Releasing class_dev id=%p",class_dev); in pvr2_sysfs_release()
502 kfree(class_dev); in pvr2_sysfs_release()
509 if (!sfp->class_dev) return; in class_dev_destroy()
515 device_remove_file(sfp->class_dev, in class_dev_destroy()
519 device_remove_file(sfp->class_dev, in class_dev_destroy()
523 device_remove_file(sfp->class_dev, in class_dev_destroy()
527 device_remove_file(sfp->class_dev, in class_dev_destroy()
531 device_remove_file(sfp->class_dev, in class_dev_destroy()
535 device_remove_file(sfp->class_dev, in class_dev_destroy()
538 pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); in class_dev_destroy()
539 dev_set_drvdata(sfp->class_dev, NULL); in class_dev_destroy()
540 dev = sfp->class_dev->parent; in class_dev_destroy()
541 sfp->class_dev->parent = NULL; in class_dev_destroy()
543 device_unregister(sfp->class_dev); in class_dev_destroy()
544 sfp->class_dev = NULL; in class_dev_destroy()
548 static ssize_t v4l_minor_number_show(struct device *class_dev, in v4l_minor_number_show() argument
552 sfp = dev_get_drvdata(class_dev); in v4l_minor_number_show()
560 static ssize_t bus_info_show(struct device *class_dev, in bus_info_show() argument
564 sfp = dev_get_drvdata(class_dev); in bus_info_show()
571 static ssize_t hdw_name_show(struct device *class_dev, in hdw_name_show() argument
575 sfp = dev_get_drvdata(class_dev); in hdw_name_show()
582 static ssize_t hdw_desc_show(struct device *class_dev, in hdw_desc_show() argument
586 sfp = dev_get_drvdata(class_dev); in hdw_desc_show()
593 static ssize_t v4l_radio_minor_number_show(struct device *class_dev, in v4l_radio_minor_number_show() argument
598 sfp = dev_get_drvdata(class_dev); in v4l_radio_minor_number_show()
606 static ssize_t unit_number_show(struct device *class_dev, in unit_number_show() argument
610 sfp = dev_get_drvdata(class_dev); in unit_number_show()
621 struct device *class_dev; in class_dev_create() local
626 class_dev = kzalloc(sizeof(*class_dev),GFP_KERNEL); in class_dev_create()
627 if (!class_dev) return; in class_dev_create()
629 pvr2_sysfs_trace("Creating class_dev id=%p",class_dev); in class_dev_create()
631 class_dev->class = &class_ptr->class; in class_dev_create()
633 dev_set_name(class_dev, "%s", in class_dev_create()
636 class_dev->parent = get_device(&usb_dev->dev); in class_dev_create()
638 sfp->class_dev = class_dev; in class_dev_create()
639 dev_set_drvdata(class_dev, sfp); in class_dev_create()
640 ret = device_register(class_dev); in class_dev_create()
644 put_device(class_dev); in class_dev_create()
653 ret = device_create_file(sfp->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,&sfp->attr_unit_number); in class_dev_create()
697 ret = device_create_file(sfp->class_dev, 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()
801 static ssize_t debuginfo_show(struct device *class_dev, in debuginfo_show() argument
805 sfp = dev_get_drvdata(class_dev); in debuginfo_show()
812 static ssize_t debugcmd_show(struct device *class_dev, in debugcmd_show() argument
816 sfp = dev_get_drvdata(class_dev); in debugcmd_show()
822 static ssize_t debugcmd_store(struct device *class_dev, in debugcmd_store() argument
829 sfp = dev_get_drvdata(class_dev); in debugcmd_store()