lib: devres: add a comment about the devm_of_iomap() function
[linux-2.6-block.git] / lib / devres.c
index ca0d28727ccef27dbbc9338b7c04d919f2189979..ebb1573d9ae36f3d6ad311f965950457075e3e17 100644 (file)
@@ -213,6 +213,12 @@ void __iomem *devm_ioremap_resource_wc(struct device *dev,
  *     base = devm_of_iomap(&pdev->dev, node, 0, NULL);
  *     if (IS_ERR(base))
  *             return PTR_ERR(base);
+ *
+ * Please Note: This is not a one-to-one replacement for of_iomap() because the
+ * of_iomap() function does not track whether the region is already mapped.  If
+ * two drivers try to map the same memory, the of_iomap() function will succeed
+ * but the the devm_of_iomap() function will return -EBUSY.
+ *
  */
 void __iomem *devm_of_iomap(struct device *dev, struct device_node *node, int index,
                            resource_size_t *size)