From: David KOENIG <karhudever@gmail.com>
To: linux-kernel@vger.kernel.org, kernel-janitors@lists.osdl.org
Subject: [KJ] [PATCH] Replaced tty->driver_data lines with
Date: Thu, 19 Oct 2006 19:02:59 +0000 [thread overview]
Message-ID: <4537CBE3.4080809@gmail.com> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- From 19b980cb8ac383534e30ec948f03c3fff11da5f1 Mon Sep 17 00:00:00 2001
From: David KOENIG <karhudever@gmail.com>
Date: Thu, 19 Oct 2006 11:55:21 -0700
Subject: [PATCH] Replaced tty->driver_data lines with pci_get_drvdata(tty);
- ---
fs/compat_ioctl.c | 2 +-
net/irda/ircomm/ircomm_tty.c | 24 ++++++++++++------------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index a91f262..b7c2746 100644
- --- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1270,7 +1270,7 @@ static int do_kdfontop_ioctl(unsigned in
return -EPERM;
op.data = compat_ptr(((struct console_font_op32 *)&op)->data);
op.flags |= KD_FONT_FLAG_OLD;
- - vc = ((struct tty_struct *)file->private_data)->driver_data;
+ vc = pci_get_drvdata((struct tty_struct *)file->private_data);
i = con_font_op(vc, &op);
if (i)
return i;
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index d50a020..ce7e87a 100644
- --- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -416,7 +416,7 @@ static int ircomm_tty_open(struct tty_st
spin_lock_irqsave(&self->spinlock, flags);
self->open_count++;
- - tty->driver_data = self;
+ pci_set_drvdata(tty, self);
self->tty = tty;
spin_unlock_irqrestore(&self->spinlock, flags);
@@ -490,7 +490,7 @@ #endif
*/
static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
@@ -581,7 +581,7 @@ static void ircomm_tty_close(struct tty_
*/
static void ircomm_tty_flush_buffer(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic = IRCOMM_TTY_MAGIC, return;);
@@ -670,7 +670,7 @@ static void ircomm_tty_do_softint(void *
static int ircomm_tty_write(struct tty_struct *tty,
const unsigned char *buf, int count)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
struct sk_buff *skb;
int tailroom = 0;
@@ -802,7 +802,7 @@ #endif
*/
static int ircomm_tty_write_room(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
int ret;
@@ -842,7 +842,7 @@ #endif
*/
static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long orig_jiffies, poll_time;
unsigned long flags;
@@ -879,7 +879,7 @@ static void ircomm_tty_wait_until_sent(s
*/
static void ircomm_tty_throttle(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
@@ -910,7 +910,7 @@ static void ircomm_tty_throttle(struct t
*/
static void ircomm_tty_unthrottle(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
@@ -940,7 +940,7 @@ static void ircomm_tty_unthrottle(struct
*/
static int ircomm_tty_chars_in_buffer(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
int len = 0;
@@ -1004,7 +1004,7 @@ static void ircomm_tty_shutdown(struct i
*/
static void ircomm_tty_hangup(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
@@ -1047,7 +1047,7 @@ static void ircomm_tty_send_xchar(struct
*/
void ircomm_tty_start(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
ircomm_flow_request(self->ircomm, FLOW_START);
}
@@ -1060,7 +1060,7 @@ void ircomm_tty_start(struct tty_struct
*/
static void ircomm_tty_stop(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic = IRCOMM_TTY_MAGIC, return;);
- --
1.4.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFN8vimhCgVPlWJY8RAow2AJ92boLp2ooOHk8wUIKe0rn8jTB+LQCeN/QU
Lw1GZZa1TAWMDbv0H+xzpkk=ykL2
-----END PGP SIGNATURE-----
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
WARNING: multiple messages have this Message-ID (diff)
From: David KOENIG <karhudever@gmail.com>
To: linux-kernel@vger.kernel.org, kernel-janitors@lists.osdl.org
Subject: [PATCH] Replaced tty->driver_data lines with pci_get_drvdata(tty);
Date: Thu, 19 Oct 2006 12:02:59 -0700 [thread overview]
Message-ID: <4537CBE3.4080809@gmail.com> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- From 19b980cb8ac383534e30ec948f03c3fff11da5f1 Mon Sep 17 00:00:00 2001
From: David KOENIG <karhudever@gmail.com>
Date: Thu, 19 Oct 2006 11:55:21 -0700
Subject: [PATCH] Replaced tty->driver_data lines with pci_get_drvdata(tty);
- ---
fs/compat_ioctl.c | 2 +-
net/irda/ircomm/ircomm_tty.c | 24 ++++++++++++------------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index a91f262..b7c2746 100644
- --- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1270,7 +1270,7 @@ static int do_kdfontop_ioctl(unsigned in
return -EPERM;
op.data = compat_ptr(((struct console_font_op32 *)&op)->data);
op.flags |= KD_FONT_FLAG_OLD;
- - vc = ((struct tty_struct *)file->private_data)->driver_data;
+ vc = pci_get_drvdata((struct tty_struct *)file->private_data);
i = con_font_op(vc, &op);
if (i)
return i;
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index d50a020..ce7e87a 100644
- --- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -416,7 +416,7 @@ static int ircomm_tty_open(struct tty_st
spin_lock_irqsave(&self->spinlock, flags);
self->open_count++;
- - tty->driver_data = self;
+ pci_set_drvdata(tty, self);
self->tty = tty;
spin_unlock_irqrestore(&self->spinlock, flags);
@@ -490,7 +490,7 @@ #endif
*/
static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
@@ -581,7 +581,7 @@ static void ircomm_tty_close(struct tty_
*/
static void ircomm_tty_flush_buffer(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -670,7 +670,7 @@ static void ircomm_tty_do_softint(void *
static int ircomm_tty_write(struct tty_struct *tty,
const unsigned char *buf, int count)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
struct sk_buff *skb;
int tailroom = 0;
@@ -802,7 +802,7 @@ #endif
*/
static int ircomm_tty_write_room(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
int ret;
@@ -842,7 +842,7 @@ #endif
*/
static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long orig_jiffies, poll_time;
unsigned long flags;
@@ -879,7 +879,7 @@ static void ircomm_tty_wait_until_sent(s
*/
static void ircomm_tty_throttle(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
@@ -910,7 +910,7 @@ static void ircomm_tty_throttle(struct t
*/
static void ircomm_tty_unthrottle(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
@@ -940,7 +940,7 @@ static void ircomm_tty_unthrottle(struct
*/
static int ircomm_tty_chars_in_buffer(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
int len = 0;
@@ -1004,7 +1004,7 @@ static void ircomm_tty_shutdown(struct i
*/
static void ircomm_tty_hangup(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
unsigned long flags;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
@@ -1047,7 +1047,7 @@ static void ircomm_tty_send_xchar(struct
*/
void ircomm_tty_start(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
ircomm_flow_request(self->ircomm, FLOW_START);
}
@@ -1060,7 +1060,7 @@ void ircomm_tty_start(struct tty_struct
*/
static void ircomm_tty_stop(struct tty_struct *tty)
{
- - struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *)
pci_get_drvdata(tty);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
- --
1.4.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFN8vimhCgVPlWJY8RAow2AJ92boLp2ooOHk8wUIKe0rn8jTB+LQCeN/QU
Lw1GZZa1TAWMDbv0H+xzpkk=
=ykL2
-----END PGP SIGNATURE-----
next reply other threads:[~2006-10-19 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-19 19:02 David KOENIG [this message]
2006-10-19 19:02 ` [PATCH] Replaced tty->driver_data lines with pci_get_drvdata(tty); David KOENIG
2006-10-19 19:19 ` [KJ] [PATCH] Replaced tty->driver_data lines with Matthew Wilcox
2006-10-19 19:19 ` [KJ] [PATCH] Replaced tty->driver_data lines with pci_get_drvdata(tty); Matthew Wilcox
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=4537CBE3.4080809@gmail.com \
--to=karhudever@gmail.com \
--cc=kernel-janitors@lists.osdl.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.