History log of /linux-master/drivers/input/serio/gscps2.c
Revision Date Author Comments
# a9f08ad7 18-Aug-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

Input: move from strlcpy with unused retval to strscpy

Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220818210022.6865-1-wsa+renesas@sang-engineering.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# e61b3125 02-Aug-2022 Xie Shaowen <studentxswpy@163.com>

Input: gscps2 - check return value of ioremap() in gscps2_probe()

The function ioremap() in gscps2_probe() can fail, so
its return value should be checked.

Fixes: 4bdc0d676a643 ("remove ioremap_nocache and devm_ioremap_nocache")
Cc: <stable@vger.kernel.org> # v5.6+
Reported-by: Hacash Robot <hacashRobot@santino.com>
Signed-off-by: Xie Shaowen <studentxswpy@163.com>
Signed-off-by: Helge Deller <deller@gmx.de>


# 87875c10 07-Aug-2021 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

parisc: Make struct parisc_driver::remove() return void

The caller of this function (parisc_driver_remove() in
arch/parisc/kernel/drivers.c) ignores the return value, so better don't
return any value at all to not wake wrong expectations in driver authors.

The only function that could return a non-zero value before was
ipmi_parisc_remove() which returns the return value of
ipmi_si_remove_by_dev(). Make this function return void, too, as for all
other callers the value is ignored, too.

Also fold in a small checkpatch fix for:

WARNING: Unnecessary space before function pointer arguments
+ void (*remove) (struct parisc_device *dev);

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (for drivers/input)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Acked-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Helge Deller <deller@gmx.de>


# 4bdc0d67 06-Jan-2020 Christoph Hellwig <hch@lst.de>

remove ioremap_nocache and devm_ioremap_nocache

ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>


# 78514517 15-Nov-2018 Helge Deller <deller@gmx.de>

parisc: Fix serio address output

We want the hpa addresses printed in the serio modules, not some
virtual ioremap()ed address, e.g.:

serio: gsc-ps2-keyboard port at 0xf0108000 irq 22 @ 2:0:11
serio: gsc-ps2-mouse port at 0xf0108100 irq 22 @ 2:0:12

Signed-off-by: Helge Deller <deller@gmx.de>


# 3a67ca19 04-Mar-2018 Helge Deller <deller@gmx.de>

parisc/gscps2: Fix sparse warnings

Signed-off-by: Helge Deller <deller@gmx.de>


# c1bebd07 21-Aug-2017 Helge Deller <deller@gmx.de>

parisc/serio: Fix section mismatches in gscps2 and hp_sdc drivers

Signed-off-by: Helge Deller <deller@gmx.de>


# a54aecbd 06-Apr-2015 Michael S. Tsirkin <mst@redhat.com>

Input: gscps2 - drop pci_ids dependency

This driver does not use any PCI IDs, don't include the pci_ids.h header.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 6c8afa88 04-Feb-2015 Geert Uytterhoeven <geert@linux-m68k.org>

Input: gscps2 - fix MODULE_DEVICE_TABLE invocation

The patch "module: fix types of device tables aliases" newly requires
that invocations of

MODULE_DEVICE_TABLE(type, name);

come *after* the definition of `name'. That is reasonable, but gscps2
wasn't doing this. Fix it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# e2619cf7 23-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

Input: 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>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 5298cc4c 23-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

Input: 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>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 1cb0aa88 23-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

Input: 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>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 7bfbeae9 02-Nov-2010 Guy Martin <gmsoft@tuxicoman.be>

parisc: Fix GSC PS/2 driver name for keyboard and mouse

Fix kernel warnings caused by the driver name of GSC PS/2 containing '/'.

The following warnings are observed on a K410 system :

[ 10.700000] name 'GSC PS/2 keyboard'
[ 10.732000] ------------[ cut here ]------------
[ 10.772000] WARNING: at fs/proc/generic.c:323
[ 10.828000] Modules linked in:
[ 10.916000]
[ 10.916000] YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
[ 10.936000] PSW: 00000000000001000000000000001111 Not tainted
[ 10.992000] r00-03 0004000f 104fe3e0 10201ea0 00000000
[ 11.060000] r04-07 4fc405c8 00000006 4fc405c8 4fc40694
[ 11.124000] r08-11 4fc40708 10438aa0 00000001 1043bfc8
[ 11.184000] r12-15 104ff2a0 104ff2a0 4fc38634 104ff2a0
[ 11.248000] r16-19 f0001570 10479af0 f000006c 1044fe50
[ 11.308000] r20-23 00000000 00000028 104cd858 00000000
[ 11.372000] r24-27 ffffffff 0000000e 1044fe10 1043bbe0
[ 11.436000] r28-31 0000002b 00000078 4fc40800 0000000d
[ 11.496000] sr00-03 00000000 00000000 00000000 00000000
[ 11.560000] sr04-07 00000000 00000000 00000000 00000000
[ 11.624000]
[ 11.688000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4
[ 11.704000] IIR: 03ffe01f ISR: 00000000 IOR: 0000000d
[ 11.772000] CPU: 0 CR30: 4fc40000 CR31: f01043b0
[ 11.836000] ORIG_R28: 4fc40940
[ 11.904000] IAOQ[0]: __xlate_proc_name+0x90/0xd0
[ 11.940000] IAOQ[1]: __xlate_proc_name+0x94/0xd0
[ 11.996000] RP(r2): __xlate_proc_name+0x90/0xd0
[ 12.052000] Backtrace:
[ 12.108000] [<10257790>] vsnprintf+0x290/0x4f4
[ 12.136000]
[ 12.188000] ---[ end trace 91bf6ece17e322dd ]---
[ 12.208000] serio: GSC PS/2 keyboard port at 0x0001c000 irq 19 @ 10:12:7
[ 12.264000] name 'GSC PS/2 mouse'
[ 12.344000] ------------[ cut here ]------------
[ 12.384000] WARNING: at fs/proc/generic.c:323
[ 12.436000] Modules linked in:
[ 12.524000]
[ 12.528000] YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
[ 12.544000] PSW: 00000000000001000000000000001111 Tainted: G W
[ 12.600000] r00-03 0004000f 104fe3e0 10201ea0 00000000
[ 12.680000] r04-07 4fc405c8 00000006 4fc405c8 4fc40694
[ 12.740000] r08-11 4fc40708 10438aa0 00000001 1043bfc8
[ 12.804000] r12-15 104ff2a0 104ff2a0 4fc38634 104ff2a0
[ 12.868000] r16-19 f0001570 10479af0 f000006c 1044fe50
[ 12.928000] r20-23 00000000 00000025 104cd858 00000000
[ 12.992000] r24-27 ffffffff 0000000e 1044fe10 1043bbe0
[ 13.056000] r28-31 00000028 00000078 4fc40800 0000000d
[ 13.116000] sr00-03 00000000 00000000 00000000 00000000
[ 13.180000] sr04-07 00000000 00000000 00000000 00000000
[ 13.244000]
[ 13.308000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4
[ 13.324000] IIR: 03ffe01f ISR: 00000000 IOR: 0000000d
[ 13.392000] CPU: 0 CR30: 4fc40000 CR31: f01043b0
[ 13.456000] ORIG_R28: 4fc40940
[ 13.524000] IAOQ[0]: __xlate_proc_name+0x90/0xd0
[ 13.560000] IAOQ[1]: __xlate_proc_name+0x94/0xd0
[ 13.616000] RP(r2): __xlate_proc_name+0x90/0xd0
[ 13.672000] Backtrace:
[ 13.728000] [<10257790>] vsnprintf+0x290/0x4f4
[ 13.756000]
[ 13.808000] ---[ end trace 91bf6ece17e322de ]---
[ 13.828000] serio: GSC PS/2 mouse port at 0x00020100 irq 19 @ 10:12:8

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>


# 5a0e3ad6 24-Mar-2010 Tejun Heo <tj@kernel.org>

include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>


# a0ee2037 11-Dec-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: gscps2 - fix probe() and remove() annotations

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 4e8718a1 29-Jan-2009 Kay Sievers <kay.sievers@vrfy.org>

Input: struct device - replace bus_id with dev_name(), dev_set_name()

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 5047faba 03-Feb-2008 Joe Perches <joe@perches.com>

drivers/input/: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>


# 7460caf3 29-Aug-2007 Mariusz Kozlowski <m.kozlowski@tuxland.pl>

Input: gscps2 - convert to use kzalloc

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# be577a52 06-Oct-2006 Matthew Wilcox <willy@infradead.org>

Build fixes for struct pt_regs removal

Signed-off-by: Matthew Wilcox <matthew@wil.cx>


# 7d12e780 05-Oct-2006 David Howells <dhowells@redhat.com>

IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.

(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.

(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)


# dace1453 01-Jul-2006 Thomas Gleixner <tglx@linutronix.de>

[PATCH] irq-flags: misc drivers: Use the new IRQF_ constants

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 6ab3d562 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de>

Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# 5076c158 27-Mar-2006 Helge Deller <deller@parisc-linux.org>

[PARISC] I/O-Space must be ioremap_nocache()'d

Addresses in F-space must be accessed uncached on most parisc machines.

Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>


# 6ab0f5cd 21-Oct-2005 Matthew Wilcox <willy@infradead.org>

[PARISC] Update parisc specific input code from parisc tree

Update drivers to new input layer changes.

Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Reorder code in gscps2_interrupt() and only enable ports when opened.
This fixes issues with hangs booting an SMP kernel on my C360.
Previously serio_interrupt() could be called before the lock in
struct serio was initialised.

Signed-off-by: Richard Hirst <rhirst@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>


# 53f01bba 21-Oct-2005 Matthew Wilcox <willy@infradead.org>

[PARISC] Convert parisc_device to use struct resource for hpa

Convert pa_dev->hpa from an unsigned long to a struct resource.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Fix up users of ->hpa to use ->hpa.start instead.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>


# bdad1f83 21-Oct-2005 Matthew Wilcox <willy@infradead.org>

[PARISC] Change the driver names so /sys/bus/parisc/drivers/ looks better

Make /sys/bus/parisc/drivers look better by cleaning up parisc_driver
names.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!