History log of /drivers/tty/rocket.c
Revision Date Author Comments
311df74ade503af204ac6b8ee55ce30ff2411398 03-Dec-2013 Jingoo Han <jg1.han@samsung.com> tty: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
416187caedf1c3b30f9bd1ffe4f4e5596fe65ae6 25-Apr-2013 Jiri Slaby <jslaby@suse.cz> TTY: rocket, fix more no-PCI warnings

Commit "TTY: rocket, fix compilation warning" fixed a compilation
warning, but there was still a problem with !CONFIG_PCI configs. So
fix them for good by coupling the PCI functions together and moving
them inside a common #ifdef.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f678c440022eb6274840cd11edd52a5dcc7bf1b3 15-Apr-2013 Jiri Slaby <jslaby@suse.cz> TTY: rocket, fix compilation warning

When CONFIG_PCI is unset, we see these warnings in rocket:
drivers/tty/rocket.c:3140:13: warning: 'rmSpeakerReset' defined but not used
drivers/tty/rocket.c:2599:12: warning: 'sPCIInitController' defined but not used

Fix those by moving the functions to one place and make them depend on
CONFIG_PCI.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Toralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ee7970690568b0c875467f475d9c957ec0d9e099 07-Mar-2013 Jiri Slaby <jslaby@suse.cz> TTY: cleanup tty->hw_stopped uses

tty->hw_stopped is set only by drivers to remember HW state. If it is
never set to 1 in a particular driver, there is no need to check it in
the driver at all. Remove such checks.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aa27a094e2c2e0cc59914e56113b860f524f4479 07-Mar-2013 Jiri Slaby <jslaby@suse.cz> TTY: add tty_port_tty_hangup helper

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 <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b9d42395a09b8ff81df45b8dfd763fd36e900946 17-Jan-2013 Kevin Cernekee <cernekee@gmail.com> tty: rocket: Explicitly list supported PCI IDs

Matching PCI_ANY_ID causes conflicts with RocketPort 2 adapters, which
are supported by a different driver.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37c44b52b102eb144fe4487f4a7ac39a70caee19 12-Jan-2013 Cong Ding <dinggnu@gmail.com> tty: add parenthesis to macro POLL_PERIOD in rocket.c

Macros should be enclosed in parenthesis

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2e124b4a390ca85325fae75764bef92f0547fa25 03-Jan-2013 Jiri Slaby <jslaby@suse.cz> TTY: switch tty_flip_buffer_push

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.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
92a19f9cec9a80ad93c06e115822deb729e2c6ad 03-Jan-2013 Jiri Slaby <jslaby@suse.cz> TTY: switch tty_insert_flip_char

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 <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2f69335710884ae6112fc8196ebe29b5cda7b79b 03-Jan-2013 Jiri Slaby <jslaby@suse.cz> TTY: convert more flipping functions

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_flags

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
de88b34042752c03771b779d1d985060909ab44a 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> tty: remove use of __devinitdata

CONFIG_HOTPLUG is going away as an option so __devinitdata is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
191c5f10275cfbb36802edadbdb10c73537327b4 15-Nov-2012 Jiri Slaby <jslaby@suse.cz> TTY: call tty_port_destroy in the rest of drivers

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 <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
734cc1783816ae358cef45673a29bf7af974e147 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> TTY: use tty_port_register_device

Currently we have no way to assign tty->port while performing tty
installation. There are two ways to provide the link tty_struct =>
tty_port. Either by calling tty_port_install from tty->ops->install or
tty_port_register_device called instead of tty_register_device when
the device is being set up after connected.

In this patch we modify most of the drivers to do the latter. When the
drivers use tty_register_device and we have tty_port already, we
switch to tty_port_register_device. So we have the tty_struct =>
tty_port link for free for those.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
adc8d746caa67fff4b53ba3e5163a6cbacc3b523 14-Jul-2012 Alan Cox <alan@linux.intel.com> tty: move the termios object into the tty

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 case

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
410235fd4d20b8feaf8930a0575d23acc088aa87 05-Mar-2012 Jiri Slaby <jslaby@suse.cz> TTY: remove unneeded tty->index checks

Checking if tty->index is in bounds is not needed. The tty has the
index set in the initial open. This is done in get_tty_driver. And it
can be only in interval <0,driver->num).

So remove the tests which check exactly this interval. Some are
left untouched as they check against the current backing device count.
(Leaving apart that the check is racy in most of the cases.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2f16669d322e05171c9e1cfd94f402f7399bd2a3 05-Mar-2012 Jiri Slaby <jslaby@suse.cz> TTY: remove re-assignments to tty_driver members

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 <jslaby@suse.cz>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
90ab5ee94171b3e28de6bb42ee30b527014e0be7 13-Jan-2012 Rusty Russell <rusty@rustcorp.com.au> module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
60063497a95e716c9a689af3be2687d261f115b4 27-Jul-2011 Arun Sharma <asharma@fb.com> atomic: use <linux/atomic.h>

This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d65c57f4ece4c31380eef9975a04840df7b260cc 23-Mar-2011 Jiri Slaby <jslaby@suse.cz> TTY: rocket, remove unused variables

drivers/tty/rocket.c:1393:2: warning: Value stored to 'cp' is never read
cp = &info->channel;
^ ~~~~~~~~~~~~~~
drivers/tty/rocket.c:1412:2: warning: Value stored to 'cp' is never read
cp = &info->channel;
^ ~~~~~~~~~~~~~~
drivers/tty/rocket.c:1730:2: warning: Value stored to 'cp' is never read
cp = &info->channel;
^ ~~~~~~~~~~~~~~
drivers/tty/rocket.c:1825:3: warning: Value stored to 'str' is never read
str = "8";
^ ~~~
[many 'str' warnings stripped]
drivers/tty/rocket.c:2037:3: warning: Value stored to 'board_type' is never read
board_type = "RocketModem";
^ ~~~~~~~~~~~~~
[some 'board_type' warnings stripped]

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
a6afd9f3e819de4795fcd356e5bfad446e4323f2 23-Feb-2011 Greg Kroah-Hartman <gregkh@suse.de> tty: move a number of tty drivers from drivers/char/ to drivers/tty/

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_comm

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>