History log of /drivers/misc/pti.c
Revision Date Author Comments
30399bbfa698689e81f9507992034fe09700941b 23-Sep-2013 Jingoo Han <jg1.han@samsung.com> misc: pti: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
486a5c28c2e7d6a80c393ac7d612b77d80447b84 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> misc: remove use of __devexit

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

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b328bfec519875851c4b3d95cd22371aad0a657e 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> misc: remove use of __devinitconst

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

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
80c8ae289266529445fad030fabf5fcf01ccda0d 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> misc: remove use of __devinit

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

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2d6bed9ca93e98685bc5038d686984fd449cd978 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> drivers/misc: remove use of __devexit_p

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

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Jiri Slaby <jirislaby@gmail.com>
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>
c565ee07708e19474cd1133bf50289a36b5bcc26 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, use tty_port_register_device

So now we have enough of tty_ports, so we can signal the TTY layer to
use them by tty_port_register_device.

The upside is that we look like we can introduce tty_port_easy_open
and put it directly as tty_operations->open to drivers doing nothing
in open and using tty_port_register_device. Because the easy open can
obtain a tty_port rather easily from a tty now. Heh, what a nice
by-product.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5bd420009716f3348610fdf9c6307f0db583ba04 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, fix tty_port count

We now have *one* tty_port for both TTYs. How this was supposed to
work? Change it to have a tty_port for each of TTYs.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fbf1c247dac8574ef3973adce4b20d40ff22214e 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, fix fail paths

Fail paths in ->probe and pti_init are incomplete. Fix that by adding
proper clean-up paths.

Note that we used to leak tty_driver on module unload. This is fixed
here too.

tty_unregister_driver needs not retval checking, so remove that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3140bae26c9105b4ec8ff4935631f2f09882553d 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, do the opposite of ->probe in ->remove

Currently, probe initializes some parts. Then, some of them are
unwound in ->remove, some in module_exit. Let us do the opposite of
whole ->probe in ->remove.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
065185f604c604ce77c43d7f26faf712f0bfa265 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, move ->remove to the PCI code

The function is lost somewhere in the forest. Move it to have it along
with probe and other pci_driver stuff.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dda3f32c3a7201ee79e7e6a7b1d827b89759b4bc 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, stop using iomap's unmap on ioremap space

Ioremap space is different to iomap. ->probe function uses ioremap,
but ->remove calls pci_iounmap. That one is illegal. Fix that by using
iounmap.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c6333cc65d12fddf9cf79de3950b65bc142784e1 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, pci drvdata cannot be NULL in ->remove

As we set drvdata unconditionally in ->probe, we need not check if it
is NULL. Let us remove the check.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d15684228a1f82555fcd3c5fcd86a0884bad29e3 07-Aug-2012 Jiri Slaby <jslaby@suse.cz> misc: pti, add const to pci_device_id table

It is annotated as __devinitconst. Despite the annotation is useless
in most cases, const keyword is misssing there. So we are placing
non-const data into rodata section. Fix that now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2dc60c589ba810b0c746c91f390a6796b4176572 14-Apr-2012 Arnd Bergmann <arnd@arndb.de> misc: add missing __devexit_p() annotations

Drivers that refer to a __devexit function in an operations
structure need to annotate that pointer with __devexit_p so it
is replaced with a NULL pointer when the section gets discarded.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
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>
87cab16beb882d3f9e61a2c0184fa7cf76de1f90 05-Mar-2012 Jiri Slaby <jslaby@suse.cz> TTY: remove minor_num from tty_driver

It was added back in 2004 and never used for anything real. Remove the
only assignment in the tree as well.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
81f5835eae424be646753ec5a044ed4db1fcc09a 30-Jan-2012 Jiri Slaby <jslaby@suse.cz> TTY: use tty_standard_install

Use the helper in the rest of the tty drivers. This is a simple
replacement.

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>
1ebe9dad947d3158676f5ae55fc8b4f05b85c527 15-Sep-2011 Jesper Juhl <jj@chaosbits.net> drivers/misc/pti.c: give 'comm' function scope in pti_control_frame_built_and_sent()

In drivers/misc/pti.c::pti_control_frame_built_and_sent() we assign 'comm'
to 'thread_name_p' if (!thread_name). The problem is that 'comm' then
goes out of scope and later we use 'thread_name_p' which now refers to an
out-of-scope variable. To fix that, simply move 'comm' up to have
function scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Cc: Jeremy Rocher <rocher.jeremy@gmail.com>
Cc: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
06ed4625fdfffee1251708cd30de276186d5fdcf 26-Aug-2011 Sergei Trofimovich <slyfox@gentoo.org> drivers/misc/pti.c: add missing includes

Found on allmodconfig build (ARCH=alpha)

drivers/misc/pti.c: In function 'get_id':
drivers/misc/pti.c:249: error: implicit declaration of function 'kmalloc'
drivers/misc/pti.c: In function 'pti_char_write':
drivers/misc/pti.c:658: error: implicit declaration of function 'copy_from_user'

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Cc: Jeremy Rocher <rocher.jeremy@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8168e9c2de7383c497aff9cd906dd475f9b42b2c 18-Jun-2011 J Freyensee <james_p_freyensee@linux.intel.com> PTI feature to allow user to name and mark masterchannel request.

This feature addition provides a new parameter in
pti_request_masterchannel() to allow the user
to provide their own name to mark the request when
the trace is viewed in a PTI SW trace viewer
(like MPTA). If a name is not provided and
NULL is provided, the 'current' process name is used.
API function header documentation documents this.

Signed-off-by: Jeremy Rocher <rocher.jeremy@gmail.com>
Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
e556b8131a787dd44aa614100fd8cc81794efe45 25-May-2011 J Freyensee <james_p_freyensee@linux.intel.com> pti: pti_tty_install documentation mispelling.

This patch tidies up the documentation for pti_tty_install()
function.

Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1312ba40c0d00f0a5cfcfe3afc222fcef2a90b56 25-May-2011 J Freyensee <james_p_freyensee@linux.intel.com> pti: PTI semantics fix in pti_tty_cleanup.

This patch fixes a semantics issue in the pti_tty_cleanup()
routine.

Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1dae42bff57f7a61577ee881265985a660d35c07 25-May-2011 J Freyensee <james_p_freyensee@linux.intel.com> pti: ENXIO error case memory leak PTI fix.

This patch fixes a memory leak that can occur in the error case
ENXIO is returned in the pti_tty_install() routine.

Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29021bccea0dc42d7d101004058438a9a4e693b1 25-May-2011 J Freyensee <james_p_freyensee@linux.intel.com> pti: double-free security PTI fix

This patch fixes a double-free error that will not always be
seen unless /dev/pti char interface is stressed.

Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
0b61d2acb1ea48d8eba798ed92759b7f1b0f4209 07-May-2011 J Freyensee <james_p_freyensee@linux.intel.com> Intel PTI implementaiton of MIPI 1149.7.

The PTI (Parallel Trace Interface) driver directs
trace data routed from various parts in the system out
through an Intel Penwell PTI port and out of the mobile
device for analysis with a debugging tool (Lauterbach or Fido).
Though n_tracesink and n_tracerouter line discipline drivers
are used to extract modem tracing data to the PTI driver
and other parts of an Intel mobile solution, the PTI driver
can be used independent of n_tracesink and n_tracerouter.

You should select this driver if the target kernel is meant for
an Intel Atom (non-netbook) mobile device containing a MIPI
P1149.7 standard implementation.

Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>