Skip to content

Commit f14bb03

Browse files
Andy GroverNicholas Bellinger
authored andcommitted
uio: Export definition of struct uio_device
In order to prevent a O(n) search of the filesystem to link up its uio node with its target configuration, TCMU needs to know the minor number that UIO assigned. Expose the definition of this struct so TCMU can access this field. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent 20959c4 commit f14bb03

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

‎drivers/uio/uio.c‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@
2828

2929
#define UIO_MAX_DEVICES (1U << MINORBITS)
3030

31-
struct uio_device {
32-
struct module *owner;
33-
struct device *dev;
34-
int minor;
35-
atomic_t event;
36-
struct fasync_struct *async_queue;
37-
wait_queue_head_t wait;
38-
struct uio_info *info;
39-
struct kobject *map_dir;
40-
struct kobject *portio_dir;
41-
};
42-
4331
static int uio_major;
4432
static struct cdev *uio_cdev;
4533
static DEFINE_IDR(uio_idr);

‎include/linux/uio_driver.h‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,17 @@ struct uio_port {
6363

6464
#define MAX_UIO_PORT_REGIONS 5
6565

66-
struct uio_device;
66+
struct uio_device {
67+
struct module *owner;
68+
struct device *dev;
69+
int minor;
70+
atomic_t event;
71+
struct fasync_struct *async_queue;
72+
wait_queue_head_t wait;
73+
struct uio_info *info;
74+
struct kobject *map_dir;
75+
struct kobject *portio_dir;
76+
};
6777

6878
/**
6979
* struct uio_info - UIO device capabilities

0 commit comments

Comments
 (0)