mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
parisc: turn GET_IOC into an inline function
This makes the function both more readable and more typesafe. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
9b8eeab019
commit
25c9dbe8bb
@ -26,10 +26,14 @@ static inline void *parisc_walk_tree(struct device *dev)
|
|||||||
return dev->platform_data;
|
return dev->platform_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_IOC(dev) ({ \
|
static inline struct ioc *GET_IOC(struct device *dev)
|
||||||
void *__pdata = parisc_walk_tree(dev); \
|
{
|
||||||
__pdata ? HBA_DATA(__pdata)->iommu : NULL; \
|
struct pci_hba_data *pdata = parisc_walk_tree(dev);
|
||||||
})
|
|
||||||
|
if (!pdata)
|
||||||
|
return NULL;
|
||||||
|
return pdata->iommu;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IOMMU_CCIO
|
#ifdef CONFIG_IOMMU_CCIO
|
||||||
void *ccio_get_iommu(const struct parisc_device *dev);
|
void *ccio_get_iommu(const struct parisc_device *dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user