Commit 25c9dbe8 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Helge Deller

parisc: turn GET_IOC into an inline function

This makes the function both more readable and more typesafe.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 9b8eeab0
......@@ -26,10 +26,14 @@ static inline void *parisc_walk_tree(struct device *dev)
return dev->platform_data;
}
#define GET_IOC(dev) ({ \
void *__pdata = parisc_walk_tree(dev); \
__pdata ? HBA_DATA(__pdata)->iommu : NULL; \
})
static inline struct ioc *GET_IOC(struct device *dev)
{
struct pci_hba_data *pdata = parisc_walk_tree(dev);
if (!pdata)
return NULL;
return pdata->iommu;
}
#ifdef CONFIG_IOMMU_CCIO
void *ccio_get_iommu(const struct parisc_device *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment