Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nubus: Fix up header split

Due to the '#ifdef __KERNEL__' being located in the wrong place, some
definitions from the kernel API were placed in the UAPI header during
the scripted header split. Fix this. Also, remove the duplicate comment
which is only relevant to the UAPI header.

Fixes: 607ca46e97a1 ("UAPI: (Scripted) Disintegrate include/linux")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

authored by

Finn Thain and committed by
Geert Uytterhoeven
1ff2775a 2f828fb2

+23 -27
+23 -4
include/linux/nubus.h
··· 5 5 Originally written by Alan Cox. 6 6 7 7 Hacked to death by C. Scott Ananian and David Huggins-Daines. 8 - 9 - Some of the constants in here are from the corresponding 10 - NetBSD/OpenBSD header file, by Allen Briggs. We figured out the 11 - rest of them on our own. */ 8 + */ 9 + 12 10 #ifndef LINUX_NUBUS_H 13 11 #define LINUX_NUBUS_H 14 12 15 13 #include <asm/nubus.h> 16 14 #include <uapi/linux/nubus.h> 15 + 16 + struct nubus_dir { 17 + unsigned char *base; 18 + unsigned char *ptr; 19 + int done; 20 + int mask; 21 + }; 22 + 23 + struct nubus_dirent { 24 + unsigned char *base; 25 + unsigned char type; 26 + __u32 data; /* Actually 24 bits used */ 27 + int mask; 28 + }; 17 29 18 30 struct nubus_board { 19 31 struct nubus_board* next; ··· 142 130 unsigned int len); 143 131 void nubus_get_rsrc_str(char *dest, const struct nubus_dirent *dirent, 144 132 unsigned int maxlen); 133 + 134 + /* Returns a pointer to the "standard" slot space. */ 135 + static inline void *nubus_slot_addr(int slot) 136 + { 137 + return (void *)(0xF0000000 | (slot << 24)); 138 + } 139 + 145 140 #endif /* LINUX_NUBUS_H */
-23
include/uapi/linux/nubus.h
··· 221 221 NUBUS_RESID_SIXTHMODE = 0x0085 222 222 }; 223 223 224 - struct nubus_dir 225 - { 226 - unsigned char *base; 227 - unsigned char *ptr; 228 - int done; 229 - int mask; 230 - }; 231 - 232 - struct nubus_dirent 233 - { 234 - unsigned char *base; 235 - unsigned char type; 236 - __u32 data; /* Actually 24bits used */ 237 - int mask; 238 - }; 239 - 240 - 241 - /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ 242 - static inline void *nubus_slot_addr(int slot) 243 - { 244 - return (void *)(0xF0000000|(slot<<24)); 245 - } 246 - 247 224 #endif /* _UAPILINUX_NUBUS_H */