Author: stepan Date: 2008-11-24 13:15:08 +0100 (Mon, 24 Nov 2008) New Revision: 252
Modified: openbios-devel/arch/sparc64/console.c openbios-devel/arch/sparc64/openbios.c openbios-devel/drivers/esp.c openbios-devel/drivers/floppy.c openbios-devel/drivers/ide.c openbios-devel/drivers/obio.c openbios-devel/drivers/pci.c openbios-devel/include/openbios/bindings.h Log: This patch moves all definitions of REGISTER_NAMED_NODE and REGISTER_NODE_METHODS to openbios/bindings.h.
Signed-off-by: Laurent Vivier Laurent@lvivier.info Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: openbios-devel/arch/sparc64/console.c =================================================================== --- openbios-devel/arch/sparc64/console.c 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/arch/sparc64/console.c 2008-11-24 12:15:08 UTC (rev 252) @@ -14,19 +14,6 @@ #include "sys_info.h" #include "boot.h"
-#define REGISTER_NAMED_NODE( name, path ) do { \ - bind_new_node( name##_flags_, name##_size_, \ - path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - -#define REGISTER_NODE_METHODS( name, path ) do { \ - const char *paths[1]; \ - \ - paths[0] = path; \ - bind_node( name##_flags_, name##_size_, \ - paths, 1, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - /* ****************************************************************** * serial console functions * ****************************************************************** */
Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/arch/sparc64/openbios.c 2008-11-24 12:15:08 UTC (rev 252) @@ -30,19 +30,6 @@ #define BIOS_CFG_CMD 0x510 #define BIOS_CFG_DATA 0x511
-#define REGISTER_NAMED_NODE( name, path ) do { \ - bind_new_node( name##_flags_, name##_size_, \ - path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - -#define REGISTER_NODE_METHODS( name, path ) do { \ - const char *paths[1]; \ - \ - paths[0] = path; \ - bind_node( name##_flags_, name##_size_, \ - paths, 1, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - static unsigned char intdict[256 * 1024];
// XXX
Modified: openbios-devel/drivers/esp.c =================================================================== --- openbios-devel/drivers/esp.c 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/drivers/esp.c 2008-11-24 12:15:08 UTC (rev 252) @@ -27,19 +27,6 @@
#define BUFSIZE 4096
-#define REGISTER_NAMED_NODE( name, path ) do { \ - bind_new_node( name##_flags_, name##_size_, \ - path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - -#define REGISTER_NODE_METHODS( name, path ) do { \ - const char *paths[1]; \ - \ - paths[0] = path; \ - bind_node( name##_flags_, name##_size_, \ - paths, 1, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - #ifdef CONFIG_DEBUG_ESP #define DPRINTF(fmt, args...) \ do { printk(fmt , ##args); } while (0)
Modified: openbios-devel/drivers/floppy.c =================================================================== --- openbios-devel/drivers/floppy.c 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/drivers/floppy.c 2008-11-24 12:15:08 UTC (rev 252) @@ -8,11 +8,6 @@
#include "timer.h"
-#define REGISTER_NAMED_NODE( name, path ) do { \ - bind_new_node( name##_flags_, name##_size_, \ - path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - /* DECLARE data structures for the nodes. */ DECLARE_UNNAMED_NODE( ob_floppy, INSTALL_OPEN, 2*sizeof(int) );
Modified: openbios-devel/drivers/ide.c =================================================================== --- openbios-devel/drivers/ide.c 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/drivers/ide.c 2008-11-24 12:15:08 UTC (rev 252) @@ -29,12 +29,6 @@ #include "hdreg.h" #include "timer.h"
-#define REGISTER_NAMED_NODE( name, path ) do { \ - bind_new_node( name##_flags_, name##_size_, \ - path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - - /* DECLARE data structures for the nodes. */ DECLARE_UNNAMED_NODE( ob_ide, INSTALL_OPEN, 2*sizeof(int) ); DECLARE_UNNAMED_NODE( ob_ide_ctrl, INSTALL_OPEN, sizeof(int));
Modified: openbios-devel/drivers/obio.c =================================================================== --- openbios-devel/drivers/obio.c 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/drivers/obio.c 2008-11-24 12:15:08 UTC (rev 252) @@ -24,19 +24,6 @@ #define NO_QEMU_PROTOS #include "openbios/fw_cfg.h"
-#define REGISTER_NAMED_NODE( name, path ) do { \ - bind_new_node( name##_flags_, name##_size_, \ - path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - -#define REGISTER_NODE_METHODS( name, path ) do { \ - const char *paths[1]; \ - \ - paths[0] = path; \ - bind_node( name##_flags_, name##_size_, \ - paths, 1, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - #define PROMDEV_KBD 0 /* input from keyboard */ #define PROMDEV_SCREEN 0 /* output to screen */ #define PROMDEV_TTYA 1 /* in/out to ttya */
Modified: openbios-devel/drivers/pci.c =================================================================== --- openbios-devel/drivers/pci.c 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/drivers/pci.c 2008-11-24 12:15:08 UTC (rev 252) @@ -23,11 +23,6 @@ #include "timer.h" #include "pci.h"
-#define REGISTER_NAMED_NODE( name, path ) do { \ - bind_new_node( name##_flags_, name##_size_, \ - path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ - } while(0) - #define set_bool_property(ph, name) set_property(ph, name, NULL, 0);
/* DECLARE data structures for the nodes. */
Modified: openbios-devel/include/openbios/bindings.h =================================================================== --- openbios-devel/include/openbios/bindings.h 2008-11-24 12:13:40 UTC (rev 251) +++ openbios-devel/include/openbios/bindings.h 2008-11-24 12:15:08 UTC (rev 252) @@ -106,6 +106,19 @@ void *func; } method_t;
+#define REGISTER_NAMED_NODE( name, path ) do { \ + bind_new_node( name##_flags_, name##_size_, \ + path, name##_m, sizeof(name##_m)/sizeof(method_t)); \ + } while(0) + +#define REGISTER_NODE_METHODS( name, path ) do { \ + const char *paths[1]; \ + \ + paths[0] = path; \ + bind_node( name##_flags_, name##_size_, \ + paths, 1, name##_m, sizeof(name##_m)/sizeof(method_t)); \ + } while(0) + #define DECLARE_UNNAMED_NODE( name, flags, size ) \ static const int name##_flags_ = flags; \ static const int name##_size_ = size;