Lines Matching defs:res
19 void devm_ioremap_release(struct device *dev, void *res)
21 iounmap(*(void __iomem **)res);
24 static int devm_ioremap_match(struct device *dev, void *res, void *match_data)
26 return *(void **)res == match_data;
124 __devm_ioremap_resource(struct device *dev, const struct resource *res,
134 if (!res || resource_type(res) != IORESOURCE_MEM) {
135 ret = dev_err_probe(dev, -EINVAL, "invalid resource %pR\n", res);
139 if (type == DEVM_IOREMAP && res->flags & IORESOURCE_MEM_NONPOSTED)
142 size = resource_size(res);
144 if (res->name)
146 dev_name(dev), res->name);
150 ret = dev_err_probe(dev, -ENOMEM, "can't generate pretty name for resource %pR\n", res);
154 if (!devm_request_mem_region(dev, res->start, size, pretty_name)) {
155 ret = dev_err_probe(dev, -EBUSY, "can't request region for resource %pR\n", res);
159 dest_ptr = __devm_ioremap(dev, res->start, size, type);
161 devm_release_mem_region(dev, res->start, size);
162 ret = dev_err_probe(dev, -ENOMEM, "ioremap failed for resource %pR\n", res);
172 * @res: resource to be handled
180 * res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
181 * base = devm_ioremap_resource(&pdev->dev, res);
189 const struct resource *res)
191 return __devm_ioremap_resource(dev, res, DEVM_IOREMAP);
199 * @res: resource to be handled
205 const struct resource *res)
207 return __devm_ioremap_resource(dev, res, DEVM_IOREMAP_WC);
243 struct resource res;
245 if (of_address_to_resource(node, index, &res))
248 *size = resource_size(&res);
249 return devm_ioremap_resource(dev, &res);
257 static void devm_ioport_map_release(struct device *dev, void *res)
259 ioport_unmap(*(void __iomem **)res);
262 static int devm_ioport_map_match(struct device *dev, void *res,
265 return *(void **)res == match_data;
316 static void devm_arch_phys_ac_add_release(struct device *dev, void *res)
318 arch_phys_wc_del(*((int *)res));
358 static void devm_arch_io_free_memtype_wc_release(struct device *dev, void *res)
360 const struct arch_io_reserve_memtype_wc_devres *this = res;