Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-iv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-iv
  • Repository
Switch branch/tag
  • linux-iv
  • drivers
  • char
  • ppdev.c
Find file BlameHistoryPermalink
  • Sudip Mukherjee's avatar
    ppdev: fix registering same device name · 9a69645d
    Sudip Mukherjee authored Mar 06, 2017
    Usually every parallel port will have a single pardev registered with
    it. But ppdev driver is an exception. This userspace parallel port
    driver allows to create multiple parrallel port devices for a single
    parallel port. And as a result we were having a big warning like:
    "sysfs: cannot create duplicate filename '/devices/parport0/ppdev0.0'".
    And with that many parallel port printers stopped working.
    
    We have been using the minor number as the id field while registering
    a parralel port device with a parralel port. But when there are
    multiple parrallel port device for one single parallel port, they all
    tried to register with the same name like 'pardev0.0' and everything
    started failing.
    Use an incremented index as the id instead of the minor number.
    
    Fixes: 8b7d3a9d ("ppdev: use new parport device model")
    Cc: stable <stable@vger.kernel.org> # v4.9+
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1414656
    Bugzilla: https://bugs.archlinux.org/task/52322
    
    Tested-by: default avatarJames Feeney <james@nurealm.net>
    Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9a69645d