public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: vcgandhi1@aol.com
To: g.liakhovetski@gmx.de
Cc: linux-serial@vger.kernel.org
Subject: Re: Change to serial_core.c .... causing my serial driver problem Help Request
Date: Wed, 30 Apr 2008 03:43:19 -0400	[thread overview]
Message-ID: <8CA78ACFDC41B4E-15AC-4AF9@webmail-nc04.sysops.aol.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0804241557340.5283@axis700.grange>

FYI,

I will get the patch tested tomorrow.

Vipul


-----Original Message-----
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: vcgandhi1@aol.com
Cc: linux-serial@vger.kernel.org
Sent: Thu, 24 Apr 2008 7:02 am
Subject: Re: Change to serial_core.c .... causing my serial driver 
problem Help Request



On Wed, 23 Apr 2008, vcgandhi1@aol.com wrote:

> Yes that fixes the problem. Sorry for taking some time to test it, 
but been
> busy buying a house. The process is making me exhausted.
>
> Please do try to get the patch into the mainline, and thank you for 
your time.

Thanks for testing, I presume, you tested the generic patch, modifying
drivers/serial/serial_core.c, not setting major and minor numbers in 
your
driver. However, on a second thought, I think, you probably were right,
suggesting to use major and minor numbers from the tty device in
serial_match_port. So, if you just could confirm that the patch below 
also
works for you, I'll submit it. Sorry for asking you again, I just 
cannot
easily test it myself ATM. And if it does work, please add your
"Tested-by:" to it.

Thanks
Guennadi
---
Guennadi Liakhovetski

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 0f5a179..593ae85 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1949,7 +1949,9 @@ struct uart_match {
 static int serial_match_port(struct device *dev, void *data)
 {
    struct uart_match *match = data;
-   dev_t devt = MKDEV(match->driver->major, match->driver->minor) +
match->port->line;
+   struct tty_driver *tty_drv = match->driver->tty_driver;
+   dev_t devt = MKDEV(tty_drv->major, tty_drv->minor_start) +
+       match->port->line;

    return dev->devt == devt; /* Actually, only one tty per port */
 }


  reply	other threads:[~2008-04-30  7:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8CA6D5E4DEA920C-1128-2973@webmail-nb07.sysops.aol.com>
2008-04-15 22:49 ` Change to serial_core.c .... causing my serial driver problem Help Request Guennadi Liakhovetski
     [not found]   ` <8CA6D67D9E313CC-1128-35BB@webmail-nb07.sysops.aol.com>
2008-04-16  0:08     ` vcgandhi1
2008-04-16 23:11       ` Guennadi Liakhovetski
2008-04-17  2:16         ` vcgandhi1
2008-04-17 14:55           ` Guennadi Liakhovetski
2008-04-17 16:06             ` vcgandhi1
2008-04-17  2:20         ` vcgandhi1
2008-04-17 14:58           ` Guennadi Liakhovetski
2008-04-17 16:41             ` vcgandhi1
2008-04-17 17:19               ` Guennadi Liakhovetski
2008-04-17 22:58                 ` vcgandhi1
2008-04-18 15:04                   ` Guennadi Liakhovetski
2008-04-19  5:23                     ` vcgandhi1
2008-04-23  9:09                       ` Guennadi Liakhovetski
2008-04-24  0:21                         ` vcgandhi1
2008-04-24 14:02                           ` Guennadi Liakhovetski
2008-04-30  7:43                             ` vcgandhi1 [this message]
2008-05-31 15:33                             ` vcgandhi1
2008-06-21 22:45                               ` [PATCH] Fix serial_match_port() for dynamic major tty-device numbers Guennadi Liakhovetski
2008-06-24 22:22                                 ` Andrew Morton
2008-06-24 22:54                                   ` Guennadi Liakhovetski

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=8CA78ACFDC41B4E-15AC-4AF9@webmail-nc04.sysops.aol.com \
    --to=vcgandhi1@aol.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-serial@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