Re: [PATCH] TTY changes for 2.5.69

From: Greg KH (greg@kroah.com)
Date: Wed May 07 2003 - 18:16:27 EST


ChangeSet 1.1101, 2003/05/07 15:00:03-07:00, hannal@us.ibm.com

[PATCH] pcxx tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT

 drivers/char/pcxx.c | 6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)

diff -Nru a/drivers/char/pcxx.c b/drivers/char/pcxx.c
--- a/drivers/char/pcxx.c Wed May 7 16:01:05 2003
+++ b/drivers/char/pcxx.c Wed May 7 16:01:05 2003
@@ -431,8 +431,6 @@
                 return(-ENODEV);
         }
 
- /* flag the kernel that there is somebody using this guy */
- MOD_INC_USE_COUNT;
         /*
          * If the device is in the middle of being closed, then block
          * until it's done, and then try again.
@@ -576,7 +574,6 @@
 
                 if(tty_hung_up_p(filp)) {
                         /* flag that somebody is done with this module */
- MOD_DEC_USE_COUNT;
                         restore_flags(flags);
                         return;
                 }
@@ -594,7 +591,6 @@
                 }
                 if (info->count-- > 1) {
                         restore_flags(flags);
- MOD_DEC_USE_COUNT;
                         return;
                 }
                 if (info->count < 0) {
@@ -651,7 +647,6 @@
                 info->asyncflags &= ~(ASYNC_NORMAL_ACTIVE|
                                                           ASYNC_CALLOUT_ACTIVE|ASYNC_CLOSING);
                 wake_up_interruptible(&info->close_wait);
- MOD_DEC_USE_COUNT;
                 restore_flags(flags);
         }
 }
@@ -1228,6 +1223,7 @@
 
         memset(&pcxe_driver, 0, sizeof(struct tty_driver));
         pcxe_driver.magic = TTY_DRIVER_MAGIC;
+ pcxe_driver.owner = THIS_MODULE;
         pcxe_driver.name = "ttyD";
         pcxe_driver.major = DIGI_MAJOR;
         pcxe_driver.minor_start = 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 07 2003 - 22:00:33 EST