19 Mar, 2013
1 commit
-
It allows for cleaning up on a considerable amount of places. They did
port_get, hangup, kref_put. Now the only thing needed is to call
tty_port_tty_hangup which does exactly that. And they can also decide
whether to consider CLOCAL or completely ignore that.Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
16 Jan, 2013
3 commits
-
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.This is the last one: tty_schedule_flip
Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman -
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.tty_insert_flip_char is the next one to proceed. This one is used all
over the code, so the patch is huge.Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman -
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.Now 4 string flipping ones are on turn:
* tty_insert_flip_string_flags
* tty_insert_flip_string_fixed_flag
* tty_prepare_flip_string
* tty_prepare_flip_string_flagsSigned-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
22 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Jiri Slaby
Cc: Alan Cox
Acked-by: Tobias Klauser
Cc: Lucas Tavares
Cc: Daniel Walker
Cc: Bryan Huntsman
Cc: "David S. Miller"
Cc: Peter Korsgaard
Cc: Tony Prisk
Acked-by: David Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Jiri Slaby
Cc: Alan Cox
Cc: Lucas Tavares
Cc: "David S. Miller"
Cc: Peter Korsgaard
Cc: Tony Prisk
Acked-by: Tobias Klauser
Acked-by: Nicolas Ferre
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
16 Nov, 2012
2 commits
-
After commit "TTY: move tty buffers to tty_port", the tty buffers are
not freed in some drivers. This is because tty_port_destructor is not
called whenever a tty_port is freed. This was an assumption I counted
with but was unfortunately untrue. So fix the drivers to fulfil this
assumption.To be sure, the TTY buffers (and later some stuff) are gone along with
the tty_port, we have to call tty_port_destroy at tear-down places.
This is mostly where the structure containing a tty_port is freed.
This patch does exactly that -- put tty_port_destroy at those places.Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman -
We should do hangup on dcd loss if CLOCAL is false not true.
Signed-off-by: Alan Cox
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49911
Signed-off-by: Greg Kroah-Hartman
17 Aug, 2012
1 commit
-
We changed these from alloc_tty_driver() to tty_alloc_driver() so the
error handling needs to modified to check for IS_ERR() instead of NULL.Signed-off-by: Dan Carpenter
Acked-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
16 Aug, 2012
1 commit
-
Convert a 0 error return code to a negative one, as returned elsewhere in the
function.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@(
if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
|
ret = 0
)
... when != ret = e1
*x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
... when != x = e2
when != ret = e3
*if (x == NULL || ...)
{
... when != ret = e4
* return ret;
}
//Signed-off-by: Julia Lawall
Signed-off-by: Greg Kroah-Hartman
14 Aug, 2012
1 commit
-
This allows us to provide the tty layer with information about
tty_port for each link.We also provide a tty_port for the service port. For this one we allow
only ioctl, so this is pretty ugly.Signed-off-by: Jiri Slaby
Acked-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman
17 Jul, 2012
1 commit
-
This will let us sort out a whole pile of tty related races. The
alternative would be to keep points and refcount the termios objects.
However
1. They are tiny anyway
2. Many devices don't use the stored copies
3. We can remove a pty special caseSigned-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman
29 Mar, 2012
1 commit
-
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`
Signed-off-by: David Howells
09 Mar, 2012
2 commits
-
This is supposed to be doing a shift before the comparison instead of
just doing a bitwise AND directly. The current code means the start()
just returns without doing anything.Signed-off-by: Dan Carpenter
Acked-by: Jiri Slaby
Cc: stable
Signed-off-by: Greg Kroah-Hartman -
All num, magic and owner are set by alloc_tty_driver. No need to
re-set them on each allocation site.pti driver sets something different to what it passes to
alloc_tty_driver. It is not a bug, since we don't use the lines
parameter in any way. Anyway this is fixed, and now we do the right
thing.Signed-off-by: Jiri Slaby
Acked-by: Tilman Schmidt
Signed-off-by: Greg Kroah-Hartman
02 Jul, 2011
1 commit
-
Since the printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().Signed-off-by: Manuel Zerpies
Signed-off-by: Greg Kroah-Hartman
30 Apr, 2011
1 commit
-
The tty value that should be put is the one that was just gotten by
tty_port_tty_get, not the one that is the argument to the enclosing
function.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@exists@
local idexpression struct tty_struct *x;
expression ra,rr;
statement S1,S2;
@@x = tty_port_tty_get(...)
... when != x = rr
when any
when != tty_kref_put(x,...)
when != if (...) { ... tty_kref_put(x,...) ...}
(
if() S1 else S2
|
if(...) { ... when != x = ra
when forall
when != tty_kref_put(x,...)
*return...;
}
)
//Signed-off-by: Julia Lawall
Signed-off-by: Greg Kroah-Hartman
26 Apr, 2011
1 commit
-
moxa_write can be called from atomic context with irqs disabled (from
ppp_async_push). Don't enable interrupts by spin_unlock_bh as this
might cause deadlocks in the ppp layer.Instead, use irqsave/irqrestore spin_lock functions.
Signed-off-by: Jiri Slaby
Cc: Alan Cox
Signed-off-by: Greg Kroah-Hartman
20 Apr, 2011
2 commits
-
The bit is set in tty_port_block_til_ready (via moxa_open) and unset
in tty_port_close (via moxa_close). No need to pin it in the driver.Signed-off-by: Jiri Slaby
Cc: Alan Cox
Signed-off-by: Greg Kroah-Hartman -
drivers/tty/moxa.c:1287:2: warning: Value stored to 'port' is never read
port = tty->index;
^ ~~~~~~~~~~
drivers/tty/moxa.c:1763:2: warning: Value stored to 'cflag' is never read
cflag = termio->c_cflag; /* termio->c_cflag */
^ ~~~~~~~~~~~~~~~Signed-off-by: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman
23 Feb, 2011
1 commit
-
As planned by Arnd Bergmann, this moves the following drivers from
drivers/char/ to drivers/tty/ as that's where they really belong:
amiserial
nozomi
synclink
rocket
cyclades
moxa
mxser
isicom
bfin_jtag_commCc: Arnd Bergmann
Cc: Alan Cox
Cc: Jiri Slaby
Signed-off-by: Greg Kroah-Hartman