Lines Matching refs:bsr_dev
43 struct bsr_dev { struct
54 dev_t bsr_dev; argument
80 struct bsr_dev *bsr_dev = dev_get_drvdata(dev); in bsr_size_show() local
81 return sprintf(buf, "%u\n", bsr_dev->bsr_bytes); in bsr_size_show()
88 struct bsr_dev *bsr_dev = dev_get_drvdata(dev); in bsr_stride_show() local
89 return sprintf(buf, "%u\n", bsr_dev->bsr_stride); in bsr_stride_show()
96 struct bsr_dev *bsr_dev = dev_get_drvdata(dev); in bsr_length_show() local
97 return sprintf(buf, "%llu\n", bsr_dev->bsr_len); in bsr_length_show()
107 ATTRIBUTE_GROUPS(bsr_dev);
117 struct bsr_dev *dev = filp->private_data; in bsr_mmap()
142 struct bsr_dev *dev = container_of(cdev, struct bsr_dev, bsr_cdev); in bsr_open()
157 struct bsr_dev *cur, *n; in bsr_cleanup_devs()
189 struct bsr_dev *cur = kzalloc(sizeof(struct bsr_dev), in bsr_add_node()
212 cur->bsr_dev = MKDEV(bsr_major, i + total_bsr_devs); in bsr_add_node()
244 result = cdev_add(&cur->bsr_cdev, cur->bsr_dev, 1); in bsr_add_node()
250 cur->bsr_device = device_create(&bsr_class, NULL, cur->bsr_dev, in bsr_add_node()
292 dev_t bsr_dev; in bsr_init() local
303 ret = alloc_chrdev_region(&bsr_dev, 0, BSR_MAX_DEVS, "bsr"); in bsr_init()
304 bsr_major = MAJOR(bsr_dev); in bsr_init()
319 unregister_chrdev_region(bsr_dev, BSR_MAX_DEVS); in bsr_init()