summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-08-27 10:38:32 +0300
committerHelge Deller <deller@gmx.de>2023-08-27 10:38:32 +0300
commit53861a915afeb445126588da266fc5031d1c8eaa (patch)
tree80d608cea357b5661735a0bd09282238006bddd1
parent3b425dd2aeb8c876805a4cc29d84a6c455b43530 (diff)
downloadlinux-53861a915afeb445126588da266fc5031d1c8eaa.tar.xz
parisc: sba_iommu: Convert SBA IOMMU driver to use arch_initcall()
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--arch/parisc/include/asm/processor.h1
-rw-r--r--arch/parisc/kernel/setup.c3
-rw-r--r--drivers/parisc/sba_iommu.c5
3 files changed, 3 insertions, 6 deletions
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h
index c6a526b6353c..eb0ecd9b5621 100644
--- a/arch/parisc/include/asm/processor.h
+++ b/arch/parisc/include/asm/processor.h
@@ -315,7 +315,6 @@ extern int show_cpuinfo (struct seq_file *m, void *v);
/* driver code in driver/parisc */
extern void processor_init(void);
extern void iosapic_init(void);
-extern void sba_init(void);
struct parisc_device;
struct resource;
extern void sba_distributed_lmmio(struct parisc_device *, struct resource *);
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index ef642a2ade96..84a1dce6c757 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -283,9 +283,6 @@ static int __init parisc_init(void)
#if defined(CONFIG_IOSAPIC)
iosapic_init();
#endif
-#if defined(CONFIG_IOMMU_SBA)
- sba_init();
-#endif
return 0;
}
arch_initcall(parisc_init);
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 8b1dcd537020..33da29d65f30 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -1994,10 +1994,11 @@ static int __init sba_driver_callback(struct parisc_device *dev)
** This is the only routine which is NOT static.
** Must be called exactly once before pci_init().
*/
-void __init sba_init(void)
+static int __init sba_init(void)
{
- register_parisc_driver(&sba_driver);
+ return register_parisc_driver(&sba_driver);
}
+arch_initcall(sba_init);
/**