Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1316140 > unrolled thread
| Started by | Samuel Thibault <samuel.thibault@ens-lyon.org> |
|---|---|
| First post | 2016-01-25 01:30 +0100 |
| Last post | 2016-01-25 04:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] Staging: speakup: Fix getting port information Samuel Thibault <samuel.thibault@ens-lyon.org> - 2016-01-25 01:30 +0100
Re: [PATCH] Staging: speakup: Fix getting port information Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-25 04:00 +0100
| From | Samuel Thibault <samuel.thibault@ens-lyon.org> |
|---|---|
| Date | 2016-01-25 01:30 +0100 |
| Subject | Re: [PATCH] Staging: speakup: Fix getting port information |
| Message-ID | <qUDcC-4cj-9@gated-at.bofh.it> |
Ping?
Samuel Thibault, on Fri 15 Jan 2016 00:47:41 +0100, wrote:
> Commit f79b0d9c223c ("staging: speakup: Fixed warning <linux/serial.h>
> instead of <asm/serial.h>") broke the port information in the speakup
> driver: SERIAL_PORT_DFNS only gets defined if asm/serial.h is included,
> and no other header includes asm/serial.h.
>
> We here make sure serialio.c does get the arch-specific definition of
> SERIAL_PORT_DFNS from asm/serial.h, if any.
>
> Along the way, this makes sure that we do have information for the
> requested serial port number (index)
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> Fixes: f79b0d9c223c ("staging: speakup: Fixed warning <linux/serial.h> instead of <asm/serial.h>")
>
> --- a/drivers/staging/speakup/serialio.c
> +++ b/drivers/staging/speakup/serialio.c
> @@ -6,6 +6,11 @@
> #include "spk_priv.h"
> #include "serialio.h"
>
> +#include <linux/serial_core.h>
> +/* WARNING: Do not change this to <linux/serial.h> without testing that
> + * SERIAL_PORT_DFNS does get defined to the appropriate value. */
> +#include <asm/serial.h>
> +
> #ifndef SERIAL_PORT_DFNS
> #define SERIAL_PORT_DFNS
> #endif
> @@ -23,9 +28,15 @@ const struct old_serial_port *spk_serial
> int baud = 9600, quot = 0;
> unsigned int cval = 0;
> int cflag = CREAD | HUPCL | CLOCAL | B9600 | CS8;
> - const struct old_serial_port *ser = rs_table + index;
> + const struct old_serial_port *ser;
> int err;
>
> + if (index >= ARRAY_SIZE(rs_table)) {
> + pr_info("no port info for ttyS%d\n", index);
> + return NULL;
> + }
> + ser = rs_table + index;
> +
> /* Divisor, bytesize and parity */
> quot = ser->baud_base / baud;
> cval = cflag & (CSIZE | CSTOPB);
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-01-25 04:00 +0100 |
| Message-ID | <qUFxL-5DN-3@gated-at.bofh.it> |
| In reply to | #1316140 |
On Mon, Jan 25, 2016 at 01:29:36AM +0100, Samuel Thibault wrote: > Ping? It's in my queue, I couldn't do anything until after 4.5-rc1 is out. Yours is one of 2000+ other patches I will be digging through this week... thanks, greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web