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
  • lib
  • devres.c
Find file BlameHistoryPermalink
  • Arnd Bergmann's avatar
    devres: allow const resource arguments · 04c6385d
    Arnd Bergmann authored Jun 28, 2019
    BugLink: https://bugs.launchpad.net/bugs/1864773
    
    [ Upstream commit 9dea44c9
    
     ]
    
    devm_ioremap_resource() does not currently take 'const' arguments,
    which results in a warning from the first driver trying to do it
    anyway:
    
    drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe':
    drivers/gpio/gpio-amd-fch.c:171:49: error: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
      priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores);
                                                     ^~~~~~~~~~~~~~~~~~~
    
    Change the prototype to allow it, as there is no real reason not to.
    
    Fixes: 9bb2e0452508 ("gpio: amd: Make resource struct const")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Link: https://lore.kernel.org/r/20190628150049.1108048-1-arnd@arndb.de
    
    
    Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviwed-By: default avatarEnrico Weigelt <info@metux.net>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
    Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
    04c6385d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7