aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-20 15:55:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-20 15:55:39 -0700
commita57c21c7159e07c27e317ea3513dfb382be3f153 (patch)
treed70427d2d2f44b9d973aa21e7eef93f30f17515d /include/linux
parente11c675ede0d42a405ae595528bf0b29ce1ae56f (diff)
parente454cea20bdcff10ee698d11b8882662a0153a47 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: Driver-Core: extend devnode callbacks to provide permissions
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h7
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/miscdevice.h3
-rw-r--r--include/linux/usb.h4
4 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 847b763e40e..aca31bf7d8e 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -193,7 +193,7 @@ struct class {
struct kobject *dev_kobj;
int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env);
- char *(*nodename)(struct device *dev);
+ char *(*devnode)(struct device *dev, mode_t *mode);
void (*class_release)(struct class *class);
void (*dev_release)(struct device *dev);
@@ -298,7 +298,7 @@ struct device_type {
const char *name;
const struct attribute_group **groups;
int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
- char *(*nodename)(struct device *dev);
+ char *(*devnode)(struct device *dev, mode_t *mode);
void (*release)(struct device *dev);
const struct dev_pm_ops *pm;
@@ -487,7 +487,8 @@ extern struct device *device_find_child(struct device *dev, void *data,
extern int device_rename(struct device *dev, char *new_name);
extern int device_move(struct device *dev, struct device *new_parent,
enum dpm_order dpm_order);
-extern const char *device_get_nodename(struct device *dev, const char **tmp);
+extern const char *device_get_devnode(struct device *dev,
+ mode_t *mode, const char **tmp);
extern void *dev_get_drvdata(const struct device *dev);
extern void dev_set_drvdata(struct device *dev, void *data);
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 44263cb2712..109d179adb9 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -142,7 +142,7 @@ struct gendisk {
* disks that can't be partitioned. */
char disk_name[DISK_NAME_LEN]; /* name of major driver */
- char *(*nodename)(struct gendisk *gd);
+ char *(*devnode)(struct gendisk *gd, mode_t *mode);
/* Array of pointers to partitions indexed by partno.
* Protected with matching bdev lock but stat and other
* non-critical accesses use RCU. Always access through
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 05211774462..adaf3c15e44 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -41,7 +41,8 @@ struct miscdevice {
struct list_head list;
struct device *parent;
struct device *this_device;
- const char *devnode;
+ const char *nodename;
+ mode_t mode;
};
extern int misc_register(struct miscdevice * misc);
diff --git a/include/linux/usb.h b/include/linux/usb.h
index b1e3c2fbfe1..a8fe05f224e 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -922,7 +922,7 @@ extern struct bus_type usb_bus_type;
/**
* struct usb_class_driver - identifies a USB driver that wants to use the USB major number
* @name: the usb class device name for this driver. Will show up in sysfs.
- * @nodename: Callback to provide a naming hint for a possible
+ * @devnode: Callback to provide a naming hint for a possible
* device node to create.
* @fops: pointer to the struct file_operations of this driver.
* @minor_base: the start of the minor range for this driver.
@@ -933,7 +933,7 @@ extern struct bus_type usb_bus_type;
*/
struct usb_class_driver {
char *name;
- char *(*nodename)(struct device *dev);
+ char *(*devnode)(struct device *dev, mode_t *mode);
const struct file_operations *fops;
int minor_base;
};