Skip to content

Commit

Permalink
uio: Export definition of struct uio_device
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Oct 3, 2014
1 parent 20959c4 commit f14bb03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
12 changes: 0 additions & 12 deletions drivers/uio/uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@

#define UIO_MAX_DEVICES (1U << MINORBITS)

struct uio_device {
struct module *owner;
struct device *dev;
int minor;
atomic_t event;
struct fasync_struct *async_queue;
wait_queue_head_t wait;
struct uio_info *info;
struct kobject *map_dir;
struct kobject *portio_dir;
};

static int uio_major;
static struct cdev *uio_cdev;
static DEFINE_IDR(uio_idr);
Expand Down
12 changes: 11 additions & 1 deletion include/linux/uio_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,17 @@ struct uio_port {

#define MAX_UIO_PORT_REGIONS 5

struct uio_device;
struct uio_device {
struct module *owner;
struct device *dev;
int minor;
atomic_t event;
struct fasync_struct *async_queue;
wait_queue_head_t wait;
struct uio_info *info;
struct kobject *map_dir;
struct kobject *portio_dir;
};

/**
* struct uio_info - UIO device capabilities
Expand Down

0 comments on commit f14bb03

Please sign in to comment.