staging: lustre: remove ENTRY macro
[linux-2.6-block.git] / drivers / staging / lustre / lustre / libcfs / linux / linux-module.c
index 2c7d4a3d660fe3da0abef8cb44c68e7482fbfca3..004ff71663af4608354e847c941b46c57d2408eb 100644 (file)
@@ -45,7 +45,6 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
        struct libcfs_ioctl_hdr   *hdr;
        struct libcfs_ioctl_data  *data;
        int err;
-       ENTRY;
 
        hdr = (struct libcfs_ioctl_hdr *)buf;
        data = (struct libcfs_ioctl_data *)buf;
@@ -137,7 +136,7 @@ static long libcfs_ioctl(struct file *file,
        struct cfs_psdev_file    pfile;
        int    rc = 0;
 
-       if (current_fsuid() != 0)
+       if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
 
        if ( _IOC_TYPE(cmd) != IOC_LIBCFS_TYPE ||
@@ -171,13 +170,13 @@ static long libcfs_ioctl(struct file *file,
 }
 
 static struct file_operations libcfs_fops = {
-       unlocked_ioctl: libcfs_ioctl,
-       open :    libcfs_psdev_open,
-       release :       libcfs_psdev_release
+       .unlocked_ioctl = libcfs_ioctl,
+       .open           = libcfs_psdev_open,
+       .release        = libcfs_psdev_release,
 };
 
-psdev_t libcfs_dev = {
-       LNET_MINOR,
-       "lnet",
-       &libcfs_fops
+struct miscdevice libcfs_dev = {
+       .minor = LNET_MINOR,
+       .name = "lnet",
+       .fops = &libcfs_fops,
 };