Lines Matching refs:dev

23 static ssize_t dma_show_devices(struct device *dev,  in dma_show_devices()  argument
64 static ssize_t dma_show_dev_id(struct device *dev, in dma_show_dev_id() argument
67 struct dma_channel *channel = to_dma_channel(dev); in dma_show_dev_id()
71 static ssize_t dma_store_dev_id(struct device *dev, in dma_store_dev_id() argument
75 struct dma_channel *channel = to_dma_channel(dev); in dma_store_dev_id()
82 static ssize_t dma_store_config(struct device *dev, in dma_store_config() argument
86 struct dma_channel *channel = to_dma_channel(dev); in dma_store_config()
97 static ssize_t dma_show_mode(struct device *dev, in dma_show_mode() argument
100 struct dma_channel *channel = to_dma_channel(dev); in dma_show_mode()
104 static ssize_t dma_store_mode(struct device *dev, in dma_store_mode() argument
108 struct dma_channel *channel = to_dma_channel(dev); in dma_store_mode()
116 static ssize_t dma_show_##field(struct device *dev, \
119 struct dma_channel *channel = to_dma_channel(dev); \
129 struct device *dev = &chan->dev; in dma_create_sysfs_files() local
133 dev->id = chan->vchan; in dma_create_sysfs_files()
134 dev->bus = &dma_subsys; in dma_create_sysfs_files()
136 ret = device_register(dev); in dma_create_sysfs_files()
140 ret |= device_create_file(dev, &dev_attr_dev_id); in dma_create_sysfs_files()
141 ret |= device_create_file(dev, &dev_attr_count); in dma_create_sysfs_files()
142 ret |= device_create_file(dev, &dev_attr_mode); in dma_create_sysfs_files()
143 ret |= device_create_file(dev, &dev_attr_flags); in dma_create_sysfs_files()
144 ret |= device_create_file(dev, &dev_attr_config); in dma_create_sysfs_files()
147 dev_err(&info->pdev->dev, "Failed creating attrs\n"); in dma_create_sysfs_files()
152 return sysfs_create_link(&info->pdev->dev.kobj, &dev->kobj, name); in dma_create_sysfs_files()
157 struct device *dev = &chan->dev; in dma_remove_sysfs_files() local
160 device_remove_file(dev, &dev_attr_dev_id); in dma_remove_sysfs_files()
161 device_remove_file(dev, &dev_attr_count); in dma_remove_sysfs_files()
162 device_remove_file(dev, &dev_attr_mode); in dma_remove_sysfs_files()
163 device_remove_file(dev, &dev_attr_flags); in dma_remove_sysfs_files()
164 device_remove_file(dev, &dev_attr_config); in dma_remove_sysfs_files()
167 sysfs_remove_link(&info->pdev->dev.kobj, name); in dma_remove_sysfs_files()
169 device_unregister(dev); in dma_remove_sysfs_files()