mbox series

[v2,0/3] drivers: Add the helper function devm_platform_get_and_ioremap_resource_byname()

Message ID 20210902063702.32066-1-caihuoqing@baidu.com (mailing list archive)
Headers show
Series drivers: Add the helper function devm_platform_get_and_ioremap_resource_byname() | expand

Message

Cai,Huoqing Sept. 2, 2021, 6:36 a.m. UTC
Since provide the helper function devm_platform_ioremap_resource_byname()
which is wrap platform_get_resource_byname() and devm_ioremap_resource().
But sometimes, many drivers still need to use the resource variables obtained
by platform_get_resource(). In these case, provide this helper function
devm_platform_get_and_ioremap_resource_byname().

devm_platform_get_and_ioremap_resource_byname will be used:
 .../platform/sti/c8sectpfe/c8sectpfe-core.c   |  7 ++---
 drivers/pci/controller/pcie-mediatek-gen3.c   |  5 +---


Cai Huoqing (3):
  driver core: platform: Add the helper function
    devm_platform_get_and_ioremap_resource_byname()
  media: sti/c8sectpfe: Make use of the helper function
    devm_platform_get_and_ioremap_resource_byname()
  PCI: mediatek-gen3: Make use of the helper function
    devm_platform_get_and_ioremap_resource_byname()

 drivers/base/platform.c                       | 30 ++++++++++++++++---
 .../platform/sti/c8sectpfe/c8sectpfe-core.c   |  7 ++---
 drivers/pci/controller/pcie-mediatek-gen3.c   |  5 +---
 include/linux/platform_device.h               |  3 ++
 4 files changed, 32 insertions(+), 13 deletions(-)