aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/ccio-dma.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-01-29 19:13:10 +0100
committerHelge Deller <deller@gmx.de>2019-02-21 20:37:12 +0100
commit3654f012115db37d31e3628b26b116dc650922ac (patch)
treef261f5fef41d50b7d7160785630919462d54b992 /drivers/parisc/ccio-dma.c
parentparisc/lba_pci: use container_of in LBA_DEV (diff)
downloadlinux-dev-3654f012115db37d31e3628b26b116dc650922ac.tar.xz
linux-dev-3654f012115db37d31e3628b26b116dc650922ac.zip
parisc: remove the HBA_DATA macro
No need to hide a cast in a macro, especially as all users have cleaner ways to archive the result than blind casting. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/parisc/ccio-dma.c')
-rw-r--r--drivers/parisc/ccio-dma.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index b17e81cf77d5..097b0d43d13c 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -1519,6 +1519,7 @@ static int __init ccio_probe(struct parisc_device *dev)
{
int i;
struct ioc *ioc, **ioc_p = &ioc_list;
+ struct pci_hba_data *hba;
ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL);
if (ioc == NULL) {
@@ -1545,11 +1546,13 @@ static int __init ccio_probe(struct parisc_device *dev)
ccio_ioc_init(ioc);
ccio_init_resources(ioc);
hppa_dma_ops = &ccio_ops;
- dev->dev.platform_data = kzalloc(sizeof(struct pci_hba_data), GFP_KERNEL);
+ hba = kzalloc(sizeof(*hba), GFP_KERNEL);
/* if this fails, no I/O cards will work, so may as well bug */
- BUG_ON(dev->dev.platform_data == NULL);
- HBA_DATA(dev->dev.platform_data)->iommu = ioc;
+ BUG_ON(hba == NULL);
+
+ hba->iommu = ioc;
+ dev->dev.platform_data = hba;
#ifdef CONFIG_PROC_FS
if (ioc_count == 0) {