Skip to content

Commit 3eef6b7

Browse files
Christoph HellwigRich Felker
authored andcommitted
sh: move ioremap_fixed details out of <asm/io.h>
ioremap_fixed is an internal implementation detail and should not be exposed to drivers. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Rich Felker <[email protected]>
1 parent e12b090 commit 3eef6b7

File tree

5 files changed

+26
-16
lines changed

5 files changed

+26
-16
lines changed

arch/sh/include/asm/io.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -346,22 +346,6 @@ ioremap_prot(phys_addr_t offset, unsigned long size, unsigned long flags)
346346
}
347347
#endif
348348

349-
#ifdef CONFIG_IOREMAP_FIXED
350-
extern void __iomem *ioremap_fixed(phys_addr_t, unsigned long, pgprot_t);
351-
extern int iounmap_fixed(void __iomem *);
352-
extern void ioremap_fixed_init(void);
353-
#else
354-
static inline void __iomem *
355-
ioremap_fixed(phys_addr_t phys_addr, unsigned long size, pgprot_t prot)
356-
{
357-
BUG();
358-
return NULL;
359-
}
360-
361-
static inline void ioremap_fixed_init(void) { }
362-
static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
363-
#endif
364-
365349
#define ioremap_uc ioremap
366350

367351
/*

arch/sh/mm/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <asm/setup.h>
2929
#include <asm/cache.h>
3030
#include <linux/sizes.h>
31+
#include "ioremap.h"
3132

3233
pgd_t swapper_pg_dir[PTRS_PER_PGD];
3334

arch/sh/mm/ioremap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <asm/cacheflush.h>
2525
#include <asm/tlbflush.h>
2626
#include <asm/mmu.h>
27+
#include "ioremap.h"
2728

2829
/*
2930
* Remap an arbitrary physical address space into the kernel virtual

arch/sh/mm/ioremap.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#ifndef _SH_MM_IORMEMAP_H
2+
#define _SH_MM_IORMEMAP_H 1
3+
4+
#ifdef CONFIG_IOREMAP_FIXED
5+
void __iomem *ioremap_fixed(phys_addr_t, unsigned long, pgprot_t);
6+
int iounmap_fixed(void __iomem *);
7+
void ioremap_fixed_init(void);
8+
#else
9+
static inline void __iomem *
10+
ioremap_fixed(phys_addr_t phys_addr, unsigned long size, pgprot_t prot)
11+
{
12+
BUG();
13+
return NULL;
14+
}
15+
static inline void ioremap_fixed_init(void)
16+
{
17+
}
18+
static inline int iounmap_fixed(void __iomem *addr)
19+
{
20+
return -EINVAL;
21+
}
22+
#endif /* CONFIG_IOREMAP_FIXED */
23+
#endif /* _SH_MM_IORMEMAP_H */

arch/sh/mm/ioremap_fixed.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <asm/tlbflush.h>
2525
#include <asm/mmu.h>
2626
#include <asm/mmu_context.h>
27+
#include "ioremap.h"
2728

2829
struct ioremap_map {
2930
void __iomem *addr;

0 commit comments

Comments
 (0)