Lines Matching refs:dev
24 struct rt_device *dev = file->vnode->data; in blk_fops_open() local
32 dev->user_data = data; in blk_fops_open()
33 rt_device_control(dev, RT_DEVICE_CTRL_BLK_GETGEOME, &data->geometry); in blk_fops_open()
34 rt_device_control(dev, RT_DEVICE_CTRL_ALL_BLK_SSIZEGET, &file->vnode->size); in blk_fops_open()
41 struct rt_device *dev = file->vnode->data; in blk_fops_close() local
43 rt_free(dev->user_data); in blk_fops_close()
44 dev->user_data = RT_NULL; in blk_fops_close()
51 struct rt_device *dev = file->vnode->data; in blk_fops_ioctl() local
53 return (int)rt_device_control(dev, cmd, arg); in blk_fops_ioctl()
61 struct rt_device *dev = file->vnode->data; in blk_fops_read() local
62 struct blk_fops_data *data = dev->user_data; in blk_fops_read()
73 res = rt_device_read(dev, blk_pos, rbuf, 1); in blk_fops_read()
93 res = rt_device_read(dev, blk_pos++, rbuf, 1); in blk_fops_read()
126 struct rt_device *dev = file->vnode->data; in blk_fops_write() local
127 struct blk_fops_data *data = dev->user_data; in blk_fops_write()
149 res = rt_device_read(dev, blk_pos, rbuf, 1); in blk_fops_write()
154 res = rt_device_write(dev, blk_pos, (const void *)rbuf, 1); in blk_fops_write()
177 res = rt_device_write(dev, blk_pos, buf + wsize, (count - wsize) / bytes_per_sector); in blk_fops_write()
195 res = rt_device_read(dev, blk_pos, rbuf, 1); in blk_fops_write()
200 res = rt_device_write(dev, blk_pos, (const void *)rbuf, 1); in blk_fops_write()
218 struct rt_device *dev = file->vnode->data; in blk_fops_flush() local
220 return (int)rt_device_control(dev, RT_DEVICE_CTRL_BLK_SYNC, RT_NULL); in blk_fops_flush()
242 void device_set_blk_fops(struct rt_device *dev) in device_set_blk_fops() argument
244 dev->fops = &blk_fops; in device_set_blk_fops()
247 void device_set_blk_fops(struct rt_device *dev) in device_set_blk_fops() argument
252 void device_get_blk_ssize(struct rt_device *dev, void *args) in device_get_blk_ssize() argument
257 rt_device_control(dev, RT_DEVICE_CTRL_BLK_GETGEOME, &geometry); in device_get_blk_ssize()
265 void device_get_all_blk_ssize(struct rt_device *dev, void *args) in device_get_all_blk_ssize() argument
270 rt_device_control(dev, RT_DEVICE_CTRL_BLK_GETGEOME, &geometry); in device_get_all_blk_ssize()