Skip to content

Add managed ioremap function for shared resources

Ladislav Michl linux-mtd lkml 2 versions – In review

Get series with b4
b4 am 20180124100604.GA19593@lenoch

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v1 RFC5 patches 8 repliesSuperseded

Changes from previous version from the cover letter

- moved function prototype in headers other way around (PATCH 1/3), the rest of patches was dropped.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3devres: Move devm_ioremap_resource() out of device.hinclude/linux/device.h include/linux/io.h+1 -20 replies
2/3devres: Add devm_ioremap_shared_resource()include/linux/io.h lib/devres.c+21 -93 replies
3/3mtd: nand: davinci: Use devm_ioremap_shared_resource()drivers/mtd/nand/davinci_nand.c+7 -171 reply

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy Shevchenko
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] Add managed ioremap function for shared resources

Many drivers can simplified by using devm_ioremap_resource() instead of open coding its functionality. However, as pointed by Wei Yongjun, that function cannot be used when memory region is already taken. See previous discussion here:
https://www.spinics.net/lists/linux-pci/msg68495.html

To ease job of driver developers, new function for that purpose is implemented and its usage shown on davinci mtd driver.

Changes from previous version:
- moved function prototype in headers other way around (PATCH 1/3), the rest of patches was dropped.

Ladislav Michl (3):
devres: Move devm_ioremap_resource() out of device.h
devres: Add devm_ioremap_shared_resource()
mtd: nand: davinci: Use devm_ioremap_shared_resource()

 drivers/mtd/nand/davinci_nand.c | 24 +++++++-----------------
 include/linux/device.h          |  2 --
 include/linux/io.h              |  7 +++++++
 lib/devres.c                    | 22 ++++++++++++++--------
 4 files changed, 28 insertions(+), 27 deletions(-)
Signature · 1 line
2.15.1