24 Aug, 2018

1 commit

  • [ Upstream commit 645a397d325db6e1bb36588095ae637738b37693 ]

    The documentation for the touchscreen-swapped-x-y property states that
    swapping is done after inverting if both are used. RMI4 did it the other
    way around, leading to inconsistent behavior with regard to other
    touchscreens.

    Signed-off-by: Lucas Stach
    Tested-by: Nick Dyer
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Lucas Stach
     

21 Jun, 2018

1 commit

  • [ Upstream commit 839c42273617787318da7baf6151d553108f5e17 ]

    When extending the rmi_spi buffers, we must check that no out of memory
    error occurs, otherwise we may access data above the currently allocated
    memory.

    Propagate the error code returned by 'rmi_spi_manage_pools()' instead.

    Signed-off-by: Christophe JAILLET
    Reviewed-by: Andrew Duggan
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Christophe JAILLET
     

04 Feb, 2018

2 commits

  • commit a1ab69021a584d952e6548a44b93760547b1b6b5 upstream.

    We want to free memory reserved for interrupt mask handling only after we
    free functions, as function drivers might want to mask interrupts. This is
    needed for the followup patch to the F03 that would implement unmasking and
    masking interrupts from the serio pass-through port open() and close()
    methods.

    Reviewed-by: Lyude Paul
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • commit 6abe534f0776d2437c8302f58d8eb5abd483e926 upstream.

    Currently we register the pass-through serio port when we probe the F03 RMI
    function, and then, in sensor configure phase, we unmask interrupts.
    Unfortunately this is too late, as other drivers are free probe devices
    attached to the serio port as soon as it is probed. Because interrupts are
    masked, the IO times out, which may result in not being able to detect
    trackpoints on the pass-through port.

    To fix the issue we implement open() and close() methods for the
    pass-through serio port and unmask interrupts from there. We also move
    creation of the pass-through port form probe to configure stage, as RMI
    driver does not enable transport interrupt until all functions are probed
    (we should change this, but this is a separate topic).

    We also try to clear the pending data before unmasking interrupts, because
    some devices like to spam the system with multiple 0xaa 0x00 announcements,
    which may interfere with us trying to query ID of the device.

    Fixes: c5e8848fc98e ("Input: synaptics-rmi4 - add support for F03")
    Reviewed-by: Lyude Paul
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

24 Jan, 2018

1 commit

  • commit 55edde9fff1ae4114c893c572e641620c76c9c21 upstream.

    KASAN found a UAF due to dangling pointer. As the report below says,
    rmi_f11_attention() accesses drvdata->attn_data.data, which was freed in
    rmi_irq_fn.

    [ 311.424062] BUG: KASAN: use-after-free in rmi_f11_attention+0x526/0x5e0 [rmi_core]
    [ 311.424067] Read of size 27 at addr ffff88041fd610db by task irq/131-i2c_hid/1162
    [ 311.424075] CPU: 0 PID: 1162 Comm: irq/131-i2c_hid Not tainted 4.15.0-rc8+ #2
    [ 311.424076] Hardware name: Razer Blade Stealth/Razer, BIOS 6.05 01/26/2017
    [ 311.424078] Call Trace:
    [ 311.424086] dump_stack+0xae/0x12d
    [ 311.424090] ? _atomic_dec_and_lock+0x103/0x103
    [ 311.424094] ? show_regs_print_info+0xa/0xa
    [ 311.424099] ? input_handle_event+0x10b/0x810
    [ 311.424104] print_address_description+0x65/0x229
    [ 311.424108] kasan_report.cold.5+0xa7/0x281
    [ 311.424117] rmi_f11_attention+0x526/0x5e0 [rmi_core]
    [ 311.424123] ? memcpy+0x1f/0x50
    [ 311.424132] ? rmi_f11_attention+0x526/0x5e0 [rmi_core]
    [ 311.424143] ? rmi_f11_probe+0x1e20/0x1e20 [rmi_core]
    [ 311.424153] ? rmi_process_interrupt_requests+0x220/0x2a0 [rmi_core]
    [ 311.424163] ? rmi_irq_fn+0x22c/0x270 [rmi_core]
    [ 311.424173] ? rmi_process_interrupt_requests+0x2a0/0x2a0 [rmi_core]
    [ 311.424177] ? free_irq+0xa0/0xa0
    [ 311.424180] ? irq_finalize_oneshot.part.39+0xeb/0x180
    [ 311.424190] ? rmi_process_interrupt_requests+0x2a0/0x2a0 [rmi_core]
    [ 311.424193] ? irq_thread_fn+0x3d/0x80
    [ 311.424197] ? irq_finalize_oneshot.part.39+0x180/0x180
    [ 311.424200] ? irq_thread+0x21d/0x290
    [ 311.424203] ? irq_thread_check_affinity+0x170/0x170
    [ 311.424207] ? remove_wait_queue+0x150/0x150
    [ 311.424212] ? kasan_unpoison_shadow+0x30/0x40
    [ 311.424214] ? __init_waitqueue_head+0xa0/0xd0
    [ 311.424218] ? task_non_contending.cold.55+0x18/0x18
    [ 311.424221] ? irq_forced_thread_fn+0xa0/0xa0
    [ 311.424226] ? irq_thread_check_affinity+0x170/0x170
    [ 311.424230] ? kthread+0x19e/0x1c0
    [ 311.424233] ? kthread_create_worker_on_cpu+0xc0/0xc0
    [ 311.424237] ? ret_from_fork+0x32/0x40

    [ 311.424244] Allocated by task 899:
    [ 311.424249] kasan_kmalloc+0xbf/0xe0
    [ 311.424252] __kmalloc_track_caller+0xd9/0x1f0
    [ 311.424255] kmemdup+0x17/0x40
    [ 311.424264] rmi_set_attn_data+0xa4/0x1b0 [rmi_core]
    [ 311.424269] rmi_raw_event+0x10b/0x1f0 [hid_rmi]
    [ 311.424278] hid_input_report+0x1a8/0x2c0 [hid]
    [ 311.424283] i2c_hid_irq+0x146/0x1d0 [i2c_hid]
    [ 311.424286] irq_thread_fn+0x3d/0x80
    [ 311.424288] irq_thread+0x21d/0x290
    [ 311.424291] kthread+0x19e/0x1c0
    [ 311.424293] ret_from_fork+0x32/0x40

    [ 311.424296] Freed by task 1162:
    [ 311.424300] kasan_slab_free+0x71/0xc0
    [ 311.424303] kfree+0x90/0x190
    [ 311.424311] rmi_irq_fn+0x1b2/0x270 [rmi_core]
    [ 311.424319] rmi_irq_fn+0x257/0x270 [rmi_core]
    [ 311.424322] irq_thread_fn+0x3d/0x80
    [ 311.424324] irq_thread+0x21d/0x290
    [ 311.424327] kthread+0x19e/0x1c0
    [ 311.424330] ret_from_fork+0x32/0x40

    [ 311.424334] The buggy address belongs to the object at ffff88041fd610c0 which belongs to the cache kmalloc-64 of size 64
    [ 311.424340] The buggy address is located 27 bytes inside of 64-byte region [ffff88041fd610c0, ffff88041fd61100)
    [ 311.424344] The buggy address belongs to the page:
    [ 311.424348] page:ffffea00107f5840 count:1 mapcount:0 mapping: (null) index:0x0
    [ 311.424353] flags: 0x17ffffc0000100(slab)
    [ 311.424358] raw: 0017ffffc0000100 0000000000000000 0000000000000000 00000001802a002a
    [ 311.424363] raw: dead000000000100 dead000000000200 ffff8804228036c0 0000000000000000
    [ 311.424366] page dumped because: kasan: bad access detected

    [ 311.424369] Memory state around the buggy address:
    [ 311.424373] ffff88041fd60f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 311.424377] ffff88041fd61000: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb
    [ 311.424381] >ffff88041fd61080: fb fb fb fb fc fc fc fc fb fb fb fb fb fb fb fb
    [ 311.424384] ^
    [ 311.424387] ffff88041fd61100: fc fc fc fc fb fb fb fb fb fb fb fb fc fc fc fc
    [ 311.424391] ffff88041fd61180: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb

    Signed-off-by: Nick Desaulniers
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Nick Desaulniers
     

11 Nov, 2017

1 commit

  • Pull input layer updates from Dmitry Torokhov:

    - a new ACPI ID for Elan touchpad found in yet another Ideapad model

    - Synaptics RMI4 will allow binding to controllers reporting SMB
    version 3 (note that we are not adding any new ACPI IDs to the
    Synaptics PS/2 drover so unless user explicitly enables intertouch
    support there is no user-visible change)

    - a fixup to TSC 2004/5 touchscreen driver to mark input devices as
    "direct" to help userspace identify the type of device they are
    dealing with

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: synaptics-rmi4 - RMI4 can also use SMBUS version 3
    Input: tsc200x-core - set INPUT_PROP_DIRECT
    Input: elan_i2c - add ELAN060C to the ACPI table

    Linus Torvalds
     

08 Nov, 2017

1 commit


03 Nov, 2017

1 commit

  • …el/git/gregkh/driver-core

    Pull initial SPDX identifiers from Greg KH:
    "License cleanup: add SPDX license identifiers to some files

    Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the
    'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally
    binding shorthand, which can be used instead of the full boiler plate
    text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart
    and Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset
    of the use cases:

    - file had no licensing information it it.

    - file was a */uapi/* one with no licensing information in it,

    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to
    license had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied
    to a file was done in a spreadsheet of side by side results from of
    the output of two independent scanners (ScanCode & Windriver)
    producing SPDX tag:value files created by Philippe Ombredanne.
    Philippe prepared the base worksheet, and did an initial spot review
    of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537
    files assessed. Kate Stewart did a file by file comparison of the
    scanner results in the spreadsheet to determine which SPDX license
    identifier(s) to be applied to the file. She confirmed any
    determination that was not immediately clear with lawyers working with
    the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:

    - Files considered eligible had to be source code files.

    - Make and config files were included as candidates if they contained
    >5 lines of source

    - File already had some variant of a license header in it (even if <5
    lines).

    All documentation files were explicitly excluded.

    The following heuristics were used to determine which SPDX license
    identifiers to apply.

    - when both scanners couldn't find any license traces, file was
    considered to have no license information in it, and the top level
    COPYING file license applied.

    For non */uapi/* files that summary was:

    SPDX license identifier # files
    ---------------------------------------------------|-------
    GPL-2.0 11139

    and resulted in the first patch in this series.

    If that file was a */uapi/* path one, it was "GPL-2.0 WITH
    Linux-syscall-note" otherwise it was "GPL-2.0". Results of that
    was:

    SPDX license identifier # files
    ---------------------------------------------------|-------
    GPL-2.0 WITH Linux-syscall-note 930

    and resulted in the second patch in this series.

    - if a file had some form of licensing information in it, and was one
    of the */uapi/* ones, it was denoted with the Linux-syscall-note if
    any GPL family license was found in the file or had no licensing in
    it (per prior point). Results summary:

    SPDX license identifier # files
    ---------------------------------------------------|------
    GPL-2.0 WITH Linux-syscall-note 270
    GPL-2.0+ WITH Linux-syscall-note 169
    ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
    ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
    LGPL-2.1+ WITH Linux-syscall-note 15
    GPL-1.0+ WITH Linux-syscall-note 14
    ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
    LGPL-2.0+ WITH Linux-syscall-note 4
    LGPL-2.1 WITH Linux-syscall-note 3
    ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
    ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

    and that resulted in the third patch in this series.

    - when the two scanners agreed on the detected license(s), that
    became the concluded license(s).

    - when there was disagreement between the two scanners (one detected
    a license but the other didn't, or they both detected different
    licenses) a manual inspection of the file occurred.

    - In most cases a manual inspection of the information in the file
    resulted in a clear resolution of the license that should apply
    (and which scanner probably needed to revisit its heuristics).

    - When it was not immediately clear, the license identifier was
    confirmed with lawyers working with the Linux Foundation.

    - If there was any question as to the appropriate license identifier,
    the file was flagged for further research and to be revisited later
    in time.

    In total, over 70 hours of logged manual review was done on the
    spreadsheet to determine the SPDX license identifiers to apply to the
    source files by Kate, Philippe, Thomas and, in some cases,
    confirmation by lawyers working with the Linux Foundation.

    Kate also obtained a third independent scan of the 4.13 code base from
    FOSSology, and compared selected files where the other two scanners
    disagreed against that SPDX file, to see if there was new insights.
    The Windriver scanner is based on an older version of FOSSology in
    part, so they are related.

    Thomas did random spot checks in about 500 files from the spreadsheets
    for the uapi headers and agreed with SPDX license identifier in the
    files he inspected. For the non-uapi files Thomas did random spot
    checks in about 15000 files.

    In initial set of patches against 4.14-rc6, 3 files were found to have
    copy/paste license identifier errors, and have been fixed to reflect
    the correct identifier.

    Additionally Philippe spent 10 hours this week doing a detailed manual
    inspection and review of the 12,461 patched files from the initial
    patch version early this week with:

    - a full scancode scan run, collecting the matched texts, detected
    license ids and scores

    - reviewing anything where there was a license detected (about 500+
    files) to ensure that the applied SPDX license was correct

    - reviewing anything where there was no detection but the patch
    license was not GPL-2.0 WITH Linux-syscall-note to ensure that the
    applied SPDX license was correct

    This produced a worksheet with 20 files needing minor correction. This
    worksheet was then exported into 3 different .csv files for the
    different types of files to be modified.

    These .csv files were then reviewed by Greg. Thomas wrote a script to
    parse the csv files and add the proper SPDX tag to the file, in the
    format that the file expected. This script was further refined by Greg
    based on the output to detect more types of files automatically and to
    distinguish between header and source .c files (which need different
    comment types.) Finally Greg ran the script using the .csv files to
    generate the patches.

    Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
    Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

    * tag 'spdx_identifiers-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    License cleanup: add SPDX license identifier to uapi header files with a license
    License cleanup: add SPDX license identifier to uapi header files with no license
    License cleanup: add SPDX GPL-2.0 license identifier to files with no license

    Linus Torvalds
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

28 Oct, 2017

1 commit

  • By convention the first 6 bits of F30 Ctrl 2 and 3 are used to signify
    GPIOs which are connected to buttons. Additional GPIOs may be used as
    input GPIOs to signal the touch controller of some event
    (ie disable touchpad). These additional GPIOs may meet the criteria of
    a button in rmi_f30_is_valid_button() but should not be considered
    buttons. This patch limits the GPIOs which are mapped to buttons to just
    the first 6.

    Signed-off-by: Andrew Duggan
    Reported-by: Daniel Martin
    Tested-by: Daniel Martin
    Acked-By: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Andrew Duggan
     

25 Jul, 2017

1 commit


22 Jul, 2017

1 commit


13 Jul, 2017

2 commits

  • attribute_groups are not supposed to change at runtime. All functions
    working with attribute_groups provided by work with const
    attribute_group. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    4777 480 0 5257 1489 drivers/input/rmi4/rmi_f01.o

    File size After adding 'const':
    text data bss dec hex filename
    4817 416 0 5233 1471 drivers/input/rmi4/rmi_f01.o

    Signed-off-by: Arvind Yadav
    Signed-off-by: Dmitry Torokhov

    Arvind Yadav
     
  • attribute_groups are not supposed to change at runtime. All functions
    working with attribute_groups provided by work with const
    attribute_group. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    5287 448 0 5735 1667 drivers/input/rmi4/rmi_f34.o

    File size After adding 'const':
    text data bss dec hex filename
    5339 384 0 5723 165b drivers/input/rmi4/rmi_f34.o

    Signed-off-by: Arvind Yadav
    Signed-off-by: Dmitry Torokhov

    Arvind Yadav
     

23 Jun, 2017

1 commit

  • The F54 driver is currently only using the first 6 bytes of F54 so there is
    no need to read all 27 bytes. Some Dell systems (Dell XP13 9333 and
    similar) have an issue with the touchpad or I2C bus when reading reports
    larger then 16 bytes. Reads larger then 16 bytes are reported in two HID
    reports. Something about the back to back reports seems to cause the next
    read to report incorrect data. This results in F30 failing to load and the
    click button failing to work.

    Previous issues with the I2C controller or touchpad were addressed in:
    commit 5b65c2a02966 ("HID: rmi: check sanity of the incoming report")

    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=195949
    Signed-off-by: Andrew Duggan
    Reviewed-by: Benjamin Tissoires
    Reviewed-by: Nick Dyer
    Signed-off-by: Dmitry Torokhov

    Andrew Duggan
     

10 Jun, 2017

1 commit

  • The 5th generation Thinkpad X1 Carbons use Synaptics touchpads accessible
    over SMBus/RMI, combined with ALPS or Elantech trackpoint devices instead
    of classic IBM/Lenovo trackpoints. Unfortunately there is no way for ALPS
    driver to detect whether it is dealing with touchpad + trackpoint
    combination or just a trackpoint, so we end up with a "phantom" dualpoint
    ALPS device in addition to real touchpad and trackpoint.

    Given that we do not have any special advanced handling for ALPS or
    Elantech trackpoints (unlike IBM trackpoints that have separate driver and
    a host of options) we are better off keeping the trackpoints in PS/2
    emulation mode. We achieve that by setting serio type to SERIO_PS_PSTHRU,
    which will limit number of protocols psmouse driver will try. In addition
    to getting rid of the "phantom" touchpads, this will also speed up probing
    of F03 pass-through port.

    Reported-by: Damjan Georgievski
    Suggested-by: Benjamin Tissoires
    Acked-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

02 Jun, 2017

1 commit


30 May, 2017

1 commit


15 Apr, 2017

3 commits


04 Apr, 2017

4 commits


24 Mar, 2017

1 commit

  • Pull input fixes from Dmitry Torokhov:
    "Fixes to various USB drivers to validate existence of endpoints before
    trying to use them, fixes to APLS v8 protocol, and a couple of i8042
    quirks"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: ALPS - fix trackstick button handling on V8 devices
    Input: ALPS - fix V8+ protocol handling (73 03 28)
    Input: sur40 - validate number of endpoints before using them
    Input: kbtab - validate number of endpoints before using them
    Input: hanwang - validate number of endpoints before using them
    Input: yealink - validate number of endpoints before using them
    Input: ims-pcu - validate number of endpoints before using them
    Input: cm109 - validate number of endpoints before using them
    Input: iforce - validate number of endpoints before using them
    Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw
    Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list
    Input: synaptics-rmi4 - prevent null pointer dereference in f30
    Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000

    Linus Torvalds
     

11 Mar, 2017

1 commit


02 Mar, 2017

1 commit


21 Feb, 2017

1 commit


10 Feb, 2017

2 commits

  • On the latest series of ThinkPads, the button events for the TrackPoint
    are reported through the touchpad itself as opposed to the TrackPoint
    device. In order to report these buttons properly, we need to forward
    them to the TrackPoint device and notify psmouse to send the button
    presses/releases.

    Signed-off-by: Lyude Paul
    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • This patch does several cleanup changes to F30 code

    - switch to using BIT() macro
    - use DIV_ROUND_UP() where appropriate
    - factor out code setting up and reporting buttons
    - use single loop when reporting buttons: arithmetic is cheap compared to
    conditionals and associated branch misprediction.

    Tested-By: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

08 Feb, 2017

2 commits

  • With CONFIG_SERIO=m, we get a build error for the rmi4-f03 driver,
    added in linux-4.10:

    warning: (HID_RMI) selects RMI4_F03 which has unmet direct dependencies (!UML && INPUT && RMI4_CORE && (SERIO=y || RMI4_CORE=SERIO))
    drivers/input/built-in.o: In function `rmi_f03_attention':
    rmi_f03.c:(.text+0xcfe0): undefined reference to `serio_interrupt'
    rmi_f03.c:(.text+0xd055): undefined reference to `serio_interrupt'
    drivers/input/built-in.o: In function `rmi_f03_remove':
    rmi_f03.c:(.text+0xd115): undefined reference to `serio_unregister_port'
    drivers/input/built-in.o: In function `rmi_f03_probe':
    rmi_f03.c:(.text+0xd209): undefined reference to `__serio_register_port'

    An earlier patch tried to fix this, but missed the HID_RMI driver that
    does a 'select' on the F03 backend.

    This adds a hidden Kconfig symbol that enforces 'serio' to be enabled
    when RMI4-F03 is, which covers all cases.

    Fixes: d7ddad0acc4a ("Input: synaptics-rmi4 - fix F03 build error when serio is module")
    Fixes: c5e8848fc98e ("Input: synaptics-rmi4 - add support for F03")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Dmitry Torokhov

    Arnd Bergmann
     
  • Fix to return error code -ENOMEM from the devm_kzalloc() error handling
    case instead of 0, as done elsewhere in this function.

    Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions
    from probe")
    Signed-off-by: Wei Yongjun
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Wei Yongjun
     

07 Feb, 2017

2 commits


01 Feb, 2017

2 commits


31 Jan, 2017

1 commit


25 Jan, 2017

1 commit

  • Declare device_type structures as const as they are only stored in the
    type field of a device structure. This field is of type const, so add
    const to declaration of device_type structures.

    File size before:
    text data bss dec hex filename
    17184 1344 80 18608 48b0 drivers/input/input.o

    File size after:
    text data bss dec hex filename
    17248 1280 80 18608 48b0 drivers/input/input.o

    File size before:
    text data bss dec hex filename
    2355 384 8 2747 abb drivers/input/rmi4/rmi_bus.o

    File size after:
    text data bss dec hex filename
    2483 264 8 2755 ac3 drivers/input/rmi4/rmi_bus.o

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Dmitry Torokhov

    Bhumika Goyal
     

22 Jan, 2017

1 commit