]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: a typedef for 'struct miscdevice'???
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jul 2013 17:21:26 +0000 (10:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jul 2013 17:21:26 +0000 (10:21 -0700)
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>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
drivers/staging/lustre/lustre/libcfs/module.c
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c

index 2983ce412b662415724201862bac4ddc6808841e..0f76da5c6c2dfeaded04753e079e94af514fc616 100644 (file)
@@ -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.
  */
 
index acdf7ee089f217e75cee14ac3b5df4d9f9b2828e..03903ab8f0ccb5d73ca2a6c32ca55b92e987f1ba 100644 (file)
 #define NR_CPUS     1
 #endif
 
-/*
- * cache
- */
-
-/*
- * IRQs
- */
-
-
-/*
- * Pseudo device register
- */
-typedef struct miscdevice              psdev_t;
-
 /*
  * Sysctl register
  */
index 6b0054ff79159cab1c4863145d8dedda0dd1939a..d8f320e6f4b61e0f1f63b8dd12936c5e338b41f2 100644 (file)
@@ -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,
 };
index 3372537c6f3b45bc5cfd1abfda42604f875fd5c3..52525bc7ddb08695f66edb2d4efb4176ab08cbdd 100644 (file)
@@ -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;
index 799a1ed8701f36d502520c557bd14c3b773cc562..deebf806cde043e455ba0f232ea28e87230d94e4 100644 (file)
@@ -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)
index 2abacf20653165850c2fd1392eaf8e6dd589d111..9fe53f3a98ce8d7e52dff7e6592d9c4999319c53 100644 (file)
@@ -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,