Re: Change to serial_core.c .... causing my serial driver problem Help Request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




This patch worked, sorry for the delay.


Tested-by:vcgandhi1@xxxxxxx


Vipul Gandhi

-----Original Message-----
From: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
To: vcgandhi1@xxxxxxx
Cc: linux-serial@xxxxxxxxxxxxxxx
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@xxxxxxx 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 */
}

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux