Lines Matching refs:of_dev
85 static struct of_device * of_dev;
603 of_dev = of_platform_device_create(np, "temperatures", NULL);
605 if (of_dev == NULL) {
610 device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
611 device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
612 device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);
613 device_create_file(&of_dev->dev, &dev_attr_sensor2_limit);
614 device_create_file(&of_dev->dev, &dev_attr_sensor1_location);
615 device_create_file(&of_dev->dev, &dev_attr_sensor2_location);
616 device_create_file(&of_dev->dev, &dev_attr_limit_adjust);
617 device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed);
618 device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
620 device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
632 if (of_dev) {
633 device_remove_file(&of_dev->dev, &dev_attr_sensor1_temperature);
634 device_remove_file(&of_dev->dev, &dev_attr_sensor2_temperature);
635 device_remove_file(&of_dev->dev, &dev_attr_sensor1_limit);
636 device_remove_file(&of_dev->dev, &dev_attr_sensor2_limit);
637 device_remove_file(&of_dev->dev, &dev_attr_sensor1_location);
638 device_remove_file(&of_dev->dev, &dev_attr_sensor2_location);
639 device_remove_file(&of_dev->dev, &dev_attr_limit_adjust);
640 device_remove_file(&of_dev->dev, &dev_attr_specified_fan_speed);
641 device_remove_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
644 device_remove_file(&of_dev->dev,
647 of_device_unregister(of_dev);