summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 17:21:26 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 17:21:26 (GMT)
commitc0426cf7df119c68a9715713f9dbf07862172f04 (patch)
tree49f6fcc148752598b0bcbf3e9bfa7cece59f0210
parent0f1c743b992908ac2a31c7fec0e0fcac003deee5 (diff)
downloadlinux-c0426cf7df119c68a9715713f9dbf07862172f04.tar.xz
staging: lustre: a typedef for 'struct miscdevice'???
Come on, that's just silly... Anyway, remove the typedef and fix up the initializer to use named fields, otherwise bad things might happen in the future. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs.h5
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h14
-rw-r--r--drivers/staging/lustre/lustre/libcfs/linux/linux-module.c8
-rw-r--r--drivers/staging/lustre/lustre/libcfs/module.c2
-rw-r--r--drivers/staging/lustre/lustre/obdclass/class_obd.c2
-rw-r--r--drivers/staging/lustre/lustre/obdclass/linux/linux-module.c2
6 files changed, 7 insertions, 26 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 2983ce4..0f76da5 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -124,11 +124,6 @@ void libcfs_sock_release(socket_t *sock);
/*
* libcfs pseudo device operations
*
- * struct psdev_t and
- * misc_register() and
- * misc_deregister() are declared in
- * libcfs/<os>/<os>-prim.h
- *
* It's just draft now.
*/
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
index acdf7ee..03903ab 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
@@ -79,20 +79,6 @@
#endif
/*
- * cache
- */
-
-/*
- * IRQs
- */
-
-
-/*
- * Pseudo device register
- */
-typedef struct miscdevice psdev_t;
-
-/*
* Sysctl register
*/
typedef struct ctl_table ctl_table_t;
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
index 6b0054f..d8f320e 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
@@ -176,8 +176,8 @@ static struct file_operations libcfs_fops = {
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,
};
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
index 3372537..52525bc 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -365,7 +365,7 @@ MODULE_AUTHOR("Peter J. Braam <braam@clusterfs.com>");
MODULE_DESCRIPTION("Portals v3.1");
MODULE_LICENSE("GPL");
-extern psdev_t libcfs_dev;
+extern struct miscdevice libcfs_dev;
extern struct rw_semaphore cfs_tracefile_sem;
extern struct mutex cfs_trace_thread_mutex;
extern struct cfs_wi_sched *cfs_sched_rehash;
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 799a1ed..deebf80 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -432,7 +432,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
RETURN(err);
} /* class_handle_ioctl */
-extern psdev_t obd_psdev;
+extern struct miscdevice obd_psdev;
#define OBD_INIT_CHECK
int obd_init_checks(void)
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 2abacf2..9fe53f3 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -211,7 +211,7 @@ static struct file_operations obd_psdev_fops = {
};
/* modules setup */
-psdev_t obd_psdev = {
+struct miscdevice obd_psdev = {
.minor = OBD_DEV_MINOR,
.name = OBD_DEV_NAME,
.fops = &obd_psdev_fops,