Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • drivers
  • input
  • evdev.c
Find file BlameHistoryPermalink
  • Elias Vanderstuyft's avatar
    Input: don't modify the id of ioctl-provided ff effect on upload failure · fc7392aa
    Elias Vanderstuyft authored Mar 29, 2014
    If a new (id == -1) ff effect was uploaded from userspace,
    ff-core.c::input_ff_upload() will have assigned a positive number to the
    new effect id.  Currently, evdev.c::evdev_do_ioctl() will save this new id
    to userspace, regardless of whether the upload succeeded or not.
    
    On upload failure, this can be confusing because the dev->ff->effects[]
    array will not contain an element at the index of that new effect id.
    
    This patch fixes this by leaving the id unchanged after upload fails.
    
    Note: Unfortunately applications should still expect changed effect id for
    quite some time.
    
    This has been discussed on:
    http://www.mail-archive.com/linux-input@vger.kernel.org/msg08513.html
    
    
    ("ff-core effect id handling in case of a failed effect upload")
    
    Suggested-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: default avatarElias Vanderstuyft <elias.vds@gmail.com>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    fc7392aa
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7