Skip to content

Commit 0d4e30d

Browse files
committed
[MTD] Clean up <linux/mtd/physmap.h> to fix modular build
... and also fix the multiple inclusion guard so it actually _works_ Signed-off-by: David Woodhouse <dwmw2@infradead.org>
1 parent 2f20670 commit 0d4e30d

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

include/linux/mtd/physmap.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
*/
1616

1717
#ifndef __LINUX_MTD_PHYSMAP__
18-
19-
#include <linux/config.h>
20-
21-
#if defined(CONFIG_MTD_PHYSMAP)
18+
#define __LINUX_MTD_PHYSMAP__
2219

2320
#include <linux/mtd/mtd.h>
2421
#include <linux/mtd/map.h>
@@ -37,7 +34,7 @@ struct physmap_flash_data {
3734
void physmap_configure(unsigned long addr, unsigned long size,
3835
int bankwidth, void (*set_vpp)(struct map_info *, int) );
3936

40-
#if defined(CONFIG_MTD_PARTITIONS)
37+
#ifdef CONFIG_MTD_PARTITIONS
4138

4239
/*
4340
* Machines that wish to do flash partition may want to call this function in
@@ -51,6 +48,5 @@ void physmap_configure(unsigned long addr, unsigned long size,
5148
void physmap_set_partitions(struct mtd_partition *parts, int num_parts);
5249

5350
#endif /* defined(CONFIG_MTD_PARTITIONS) */
54-
#endif /* defined(CONFIG_MTD) */
5551

5652
#endif /* __LINUX_MTD_PHYSMAP__ */

0 commit comments

Comments
 (0)