forked from Minki/linux
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>
This commit is contained in:
parent
0f1c743b99
commit
c0426cf7df
@ -124,11 +124,6 @@ void libcfs_sock_release(socket_t *sock);
|
|||||||
/*
|
/*
|
||||||
* libcfs pseudo device operations
|
* 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.
|
* It's just draft now.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -78,20 +78,6 @@
|
|||||||
#define NR_CPUS 1
|
#define NR_CPUS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* cache
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IRQs
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Pseudo device register
|
|
||||||
*/
|
|
||||||
typedef struct miscdevice psdev_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sysctl register
|
* Sysctl register
|
||||||
*/
|
*/
|
||||||
|
@ -176,8 +176,8 @@ static struct file_operations libcfs_fops = {
|
|||||||
release : libcfs_psdev_release
|
release : libcfs_psdev_release
|
||||||
};
|
};
|
||||||
|
|
||||||
psdev_t libcfs_dev = {
|
struct miscdevice libcfs_dev = {
|
||||||
LNET_MINOR,
|
.minor = LNET_MINOR,
|
||||||
"lnet",
|
.name = "lnet",
|
||||||
&libcfs_fops
|
.fops = &libcfs_fops,
|
||||||
};
|
};
|
||||||
|
@ -365,7 +365,7 @@ MODULE_AUTHOR("Peter J. Braam <braam@clusterfs.com>");
|
|||||||
MODULE_DESCRIPTION("Portals v3.1");
|
MODULE_DESCRIPTION("Portals v3.1");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
extern psdev_t libcfs_dev;
|
extern struct miscdevice libcfs_dev;
|
||||||
extern struct rw_semaphore cfs_tracefile_sem;
|
extern struct rw_semaphore cfs_tracefile_sem;
|
||||||
extern struct mutex cfs_trace_thread_mutex;
|
extern struct mutex cfs_trace_thread_mutex;
|
||||||
extern struct cfs_wi_sched *cfs_sched_rehash;
|
extern struct cfs_wi_sched *cfs_sched_rehash;
|
||||||
|
@ -432,7 +432,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
|
|||||||
RETURN(err);
|
RETURN(err);
|
||||||
} /* class_handle_ioctl */
|
} /* class_handle_ioctl */
|
||||||
|
|
||||||
extern psdev_t obd_psdev;
|
extern struct miscdevice obd_psdev;
|
||||||
|
|
||||||
#define OBD_INIT_CHECK
|
#define OBD_INIT_CHECK
|
||||||
int obd_init_checks(void)
|
int obd_init_checks(void)
|
||||||
|
@ -211,7 +211,7 @@ static struct file_operations obd_psdev_fops = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* modules setup */
|
/* modules setup */
|
||||||
psdev_t obd_psdev = {
|
struct miscdevice obd_psdev = {
|
||||||
.minor = OBD_DEV_MINOR,
|
.minor = OBD_DEV_MINOR,
|
||||||
.name = OBD_DEV_NAME,
|
.name = OBD_DEV_NAME,
|
||||||
.fops = &obd_psdev_fops,
|
.fops = &obd_psdev_fops,
|
||||||
|
Loading…
Reference in New Issue
Block a user