public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] TTY changes for 2.5.58
Date: Tue, 14 Jan 2003 17:14:58 -0800	[thread overview]
Message-ID: <20030115011458.GC18283@kroah.com> (raw)
In-Reply-To: <20030115011409.GB18283@kroah.com>

ChangeSet 1.1026, 2003/01/14 16:57:38-08:00, greg@kroah.com

TTY: Added .owner for tty drivers in the drivers/usb/ directory


diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c
--- a/drivers/usb/class/bluetty.c	Tue Jan 14 17:07:00 2003
+++ b/drivers/usb/class/bluetty.c	Tue Jan 14 17:07:00 2003
@@ -1107,20 +1107,17 @@
 		return -EIO;
 	}
 
-	MOD_INC_USE_COUNT;
 	info("USB Bluetooth converter detected");
 
 	for (minor = 0; minor < BLUETOOTH_TTY_MINORS && bluetooth_table[minor]; ++minor)
 		;
 	if (bluetooth_table[minor]) {
 		err("No more free Bluetooth devices");
-		MOD_DEC_USE_COUNT;
 		return -ENODEV;
 	}
 
 	if (!(bluetooth = kmalloc(sizeof(struct usb_bluetooth), GFP_KERNEL))) {
 		err("Out of memory");
-		MOD_DEC_USE_COUNT;
 		return -ENOMEM;
 	}
 
@@ -1236,7 +1233,6 @@
 
 	/* free up any memory that we allocated */
 	kfree (bluetooth);
-	MOD_DEC_USE_COUNT;
 	return -EIO;
 }
 
@@ -1295,13 +1291,12 @@
 	} else {
 		info("device disconnected");
 	}
-
-	MOD_DEC_USE_COUNT;
 }
 
 
 static struct tty_driver bluetooth_tty_driver = {
 	.magic =		TTY_DRIVER_MAGIC,
+	.owner =		THIS_MODULE,
 	.driver_name =		"usb-bluetooth",
 	.name =			"usb/ttub/%d",
 	.major =		BLUETOOTH_TTY_MAJOR,
diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
--- a/drivers/usb/class/cdc-acm.c	Tue Jan 14 17:07:00 2003
+++ b/drivers/usb/class/cdc-acm.c	Tue Jan 14 17:07:00 2003
@@ -320,8 +320,6 @@
 	tty->driver_data = acm;
 	acm->tty = tty;
 
-	MOD_INC_USE_COUNT;
-
         lock_kernel();
 
 	if (acm->used++) {
@@ -369,7 +367,6 @@
 			kfree(acm);
 		}
 	}
-	MOD_DEC_USE_COUNT;
 }
 
 static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count)
@@ -724,6 +721,7 @@
 
 static struct tty_driver acm_tty_driver = {
 	.magic =		TTY_DRIVER_MAGIC,
+	.owner =		THIS_MODULE,
 	.driver_name =		"acm",
 	.name =			"usb/acm/%d",
 	.major =		ACM_TTY_MAJOR,
diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c	Tue Jan 14 17:07:00 2003
+++ b/drivers/usb/serial/usb-serial.c	Tue Jan 14 17:07:00 2003
@@ -1257,6 +1257,7 @@
 
 struct tty_driver usb_serial_tty_driver = {
 	.magic =		TTY_DRIVER_MAGIC,
+	.owner =		THIS_MODULE,
 	.driver_name =		"usbserial",
 #ifndef CONFIG_DEVFS_FS
 	.name =			"ttyUSB",

      reply	other threads:[~2003-01-15  1:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-15  1:13 [BK PATCH] TTY changes for 2.5.58 Greg KH
2003-01-15  1:14 ` [PATCH] " Greg KH
2003-01-15  1:14   ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030115011458.GC18283@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox