X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fclass_obd.c;h=7d2d3c911bce6500c24219ef8c61fa48ef9a3c8c;hp=bf6fb3290e57fae2fafb8a2c687226aa4b75cba6;hb=56cc9aeb7151f908ab9cac034ceaf11098bac6a4;hpb=6b0f2340286f9109380d5a0f57d981c15bd9c596 diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index bf6fb32..7d2d3c9 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -94,24 +95,6 @@ unsigned long obd_print_fail_loc(void) CWARN("obd_fail_loc = %lx\n", obd_fail_loc); return obd_fail_loc; } - -/* opening /dev/obd */ -static int obd_class_open(unsigned long flags, void *args) -{ - ENTRY; - - PORTAL_MODULE_USE; - RETURN(0); -} - -/* closing /dev/obd */ -static int obd_class_release(unsigned long flags, void *args) -{ - ENTRY; - - PORTAL_MODULE_UNUSE; - RETURN(0); -} #endif static inline void obd_data2conn(struct lustre_handle *conn, @@ -372,24 +355,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg) -#define OBD_MINOR 241 #ifdef __KERNEL__ -/* to control /dev/obd */ -static int obd_class_ioctl (struct cfs_psdev_file *pfile, unsigned long cmd, - void *arg) -{ - return class_handle_ioctl(cmd, (unsigned long)arg); -} - -/* declare character device */ -struct cfs_psdev_ops obd_psdev_ops = { - /* .p_open = */ obd_class_open, /* open */ - /* .p_close = */ obd_class_release, /* release */ - /* .p_read = */ NULL, - /* .p_write = */ NULL, - /* .p_ioctl = */ obd_class_ioctl /* ioctl */ -}; - extern cfs_psdev_t obd_psdev; #else void *obd_psdev = NULL; @@ -591,7 +557,7 @@ int init_obdclass(void) err = cfs_psdev_register(&obd_psdev); if (err) { - CERROR("cannot register %d err %d\n", OBD_MINOR, err); + CERROR("cannot register %d err %d\n", OBD_DEV_MINOR, err); return err; }