aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mdev.h')
-rw-r--r--include/linux/mdev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mdev.h b/include/linux/mdev.h
index 33674cb5ed5d..139d05b26f82 100644
--- a/include/linux/mdev.h
+++ b/include/linux/mdev.h
@@ -45,6 +45,7 @@ struct mdev_parent {
struct rw_semaphore unreg_sem;
struct mdev_type **types;
unsigned int nr_types;
+ atomic_t available_instances;
};
static inline struct mdev_device *to_mdev_device(struct device *dev)
@@ -55,6 +56,7 @@ static inline struct mdev_device *to_mdev_device(struct device *dev)
/**
* struct mdev_driver - Mediated device driver
* @device_api: string to return for the device_api sysfs
+ * @max_instances: maximum number of instances supported (optional)
* @probe: called when new device created
* @remove: called when device removed
* @get_available: Return the max number of instances that can be created
@@ -63,6 +65,7 @@ static inline struct mdev_device *to_mdev_device(struct device *dev)
**/
struct mdev_driver {
const char *device_api;
+ unsigned int max_instances;
int (*probe)(struct mdev_device *dev);
void (*remove)(struct mdev_device *dev);
unsigned int (*get_available)(struct mdev_type *mtype);