devres.c (76ca7d1cca761bb9712dfcad9a27d70b520874ae) | devres.c (ce816fa88cca083c47ab9000b2138a83043a78be) |
---|---|
1#include <linux/err.h> 2#include <linux/pci.h> 3#include <linux/io.h> 4#include <linux/gfp.h> 5#include <linux/export.h> 6 7void devm_ioremap_release(struct device *dev, void *res) 8{ --- 156 unchanged lines hidden (view full) --- 165 dest_ptr = devm_ioremap_resource(device, res); 166 if (IS_ERR(dest_ptr)) 167 return NULL; 168 169 return dest_ptr; 170} 171EXPORT_SYMBOL(devm_request_and_ioremap); 172 | 1#include <linux/err.h> 2#include <linux/pci.h> 3#include <linux/io.h> 4#include <linux/gfp.h> 5#include <linux/export.h> 6 7void devm_ioremap_release(struct device *dev, void *res) 8{ --- 156 unchanged lines hidden (view full) --- 165 dest_ptr = devm_ioremap_resource(device, res); 166 if (IS_ERR(dest_ptr)) 167 return NULL; 168 169 return dest_ptr; 170} 171EXPORT_SYMBOL(devm_request_and_ioremap); 172 |
173#ifdef CONFIG_HAS_IOPORT | 173#ifdef CONFIG_HAS_IOPORT_MAP |
174/* 175 * Generic iomap devres 176 */ 177static void devm_ioport_map_release(struct device *dev, void *res) 178{ 179 ioport_unmap(*(void __iomem **)res); 180} 181 --- 42 unchanged lines hidden (view full) --- 224 */ 225void devm_ioport_unmap(struct device *dev, void __iomem *addr) 226{ 227 ioport_unmap(addr); 228 WARN_ON(devres_destroy(dev, devm_ioport_map_release, 229 devm_ioport_map_match, (__force void *)addr)); 230} 231EXPORT_SYMBOL(devm_ioport_unmap); | 174/* 175 * Generic iomap devres 176 */ 177static void devm_ioport_map_release(struct device *dev, void *res) 178{ 179 ioport_unmap(*(void __iomem **)res); 180} 181 --- 42 unchanged lines hidden (view full) --- 224 */ 225void devm_ioport_unmap(struct device *dev, void __iomem *addr) 226{ 227 ioport_unmap(addr); 228 WARN_ON(devres_destroy(dev, devm_ioport_map_release, 229 devm_ioport_map_match, (__force void *)addr)); 230} 231EXPORT_SYMBOL(devm_ioport_unmap); |
232#endif /* CONFIG_HAS_IOPORT */ | 232#endif /* CONFIG_HAS_IOPORT_MAP */ |
233 234#ifdef CONFIG_PCI 235/* 236 * PCI iomap devres 237 */ 238#define PCIM_IOMAP_MAX PCI_ROM_RESOURCE 239 240struct pcim_iomap_devres { --- 197 unchanged lines hidden --- | 233 234#ifdef CONFIG_PCI 235/* 236 * PCI iomap devres 237 */ 238#define PCIM_IOMAP_MAX PCI_ROM_RESOURCE 239 240struct pcim_iomap_devres { --- 197 unchanged lines hidden --- |